home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / elv17exe.zip / ELVISMAN.TXT < prev    next >
Text File  |  1993-03-03  |  207KB  |  5,743 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.           ::      #######                                      ::
  17.           :::     #        #       #    #     #     ####      :::
  18.           ::::    #        #       #    #     #    #         ::::
  19.           :::::   #####    #       #    #     #     ####    :::::
  20.           ::::    #        #       #    #     #         #    ::::
  21.           :::     #        #        #  #      #    #    #     :::
  22.           ::      #######  ######    ##       #     ####       ::
  23.  
  24.                             - a clone of vi/ex -
  25.                                 version 1.7
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.      Author:  Steve Kirkendall
  48.               14407 SW Teal Blvd., Apt C
  49.               Beaverton, OR 97005
  50.  
  51.      E-Mail:  kirkenda@cs.pdx.edu
  52.  
  53.      Phone:   (503) 643-6980
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.                                    - 1 -
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.                              Table of Contents
  73.  
  74.  
  75.      INTRODUCTION What Elvis does, Copyright, How to compile
  76.      Elvis, Overview ................................................ 1
  77.  
  78.      VISUAL MODE COMMANDS Normal interactive editing, Input
  79.      mode, Arrow keys, Digraphs, Abbreviations, Auto-
  80.      indentation .................................................... 2
  81.  
  82.      COLON MODE COMMANDS Line specifiers, Text entry, Cut &
  83.      paste, Display text, Global operations, Line
  84.      editing, Undo, Configuration & status, Multiple
  85.      files, Switching files, Working with a compiler,
  86.      Exiting, File I/O, Directory & shell, Debugging ................ 3
  87.  
  88.      REGULAR EXPRESSIONS Syntax, Options, Substitutions,
  89.      Examples ....................................................... 4
  90.  
  91.      OPTIONS Autoindent, Autoprint, etc.  ............................ 5
  92.  
  93.      CUT BUFFERS Putting text into a cut buffer, Pasting from
  94.      a cut buffer, Macros, The effect of switching files ............ 6
  95.  
  96.      DIFFERENCES BETWEEN Elvis AND THE REAL VI/EX Extensions,
  97.      Omissions ...................................................... 7
  98.  
  99.      INTERNAL For programmers only, The temporary file,
  100.      Implementation of editing, Marks and the cursor,
  101.      Colon command interpretation, Screen control,
  102.      Portability .................................................... 8
  103.  
  104.      MAKEFILE ....................................................... 9
  105.  
  106.      CFLAGS ........................................................ 10
  107.  
  108.      TERMCAP ....................................................... 11
  109.  
  110.      ENVIRONMENT VARIABLES ......................................... 12
  111.  
  112.      VERSIONS ...................................................... 13
  113.  
  114.      QUESTIONS & ANSWERS ........................................... 14
  115.  
  116.  
  117.           UNIX-style "man" pages appear at the end of this manual.
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                                    - 1 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.      1.  INTRODUCTION
  139.  
  140.           Elvis is a clone  of vi/ex, the standard UNIX editor.  Elvis
  141.      supports nearly  all of the  vi/ex commands, in  both visual mode
  142.      and colon mode.
  143.  
  144.           Like vi/ex,  Elvis stores  most of  the text in  a temporary
  145.      file, instead of RAM.  This allows  it to edit files that are too
  146.      large to  fit in  a single process'  data space.  Also,  the edit
  147.      buffer can survive a power failure or crash.
  148.  
  149.           Elvis runs  under BSD UNIX,  AT&T SysV UNIX,  Minix, MS-DOS,
  150.      Atari  TOS,  Coherent, OS9/68000,  VMS  and  AmigaDos.  The  next
  151.      version  is also  expected  to add  MS-Windows,  OS/2 and  MacOS.
  152.      Contact me before you start  porting it to some other OS, because
  153.      somebody else may have already done it for you.
  154.  
  155.           Elvis is  freely redistributable,  in either source  form or
  156.      executable form.   There are no  restrictions on how  you may use
  157.      it.
  158.  
  159.      1.1 Compiling
  160.  
  161.           See the  "Versions" section of this  manual for instructions
  162.      on how to compile Elvis.
  163.  
  164.           If you want to port  Elvis to another O.S. or compiler, then
  165.      you  should  start  be  reading  the  "Portability" part  of  the
  166.      "Internal" section.
  167.  
  168.      1.2 Overview of Elvis
  169.  
  170.           The user  interface of Elvis/vi/ex is  weird.  There are two
  171.      major command modes in Elvis, and a few text input modes as well.
  172.      Each command mode has a command which allows you to switch to the
  173.      other mode.
  174.  
  175.           You will  probably use the  visual command mode  most of the
  176.      time.  This is the mode that Elvis normally starts up in.
  177.  
  178.           In  visual command  mode, the entire  screen is  filled with
  179.      lines of text from  your file.  Each keystroke is interpretted as
  180.      part of a visual command.  If  you start typing text, it will not
  181.      be inserted, it will be treated  as part of a command.  To insert
  182.      text, you  must first give  an "insert text"  command.  This will
  183.      take some  getting used to.  (An  alternative exists.  Lookup the
  184.      "inputmode" option.)
  185.  
  186.           The  colon mode  is quite different.   Elvis displays  a ":"
  187.      character on the bottom line of the screen, as a prompt.  You are
  188.      then expected to type in a command line and hit the <Return> key.
  189.      The set  of commands  recognized in  the colon mode  is different
  190.      from visual mode's.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                    - 1 -
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.      2.  VISUAL MODE COMMANDS
  205.  
  206.           Most  visual  mode commands  are  one  keystroke long.   The
  207.      following table lists  the operation performed by each keystroke,
  208.      and also denotes any options or arguments that it accepts.  Notes
  209.      at the end of the table describe the notation used in this table.
  210.  
  211.           In addition to the keys listed here, your keyboard's "arrow"
  212.      keys  will be  interpretted  as the  appropriate cursor  movement
  213.      commands.  The same goes  for <PgUp> and <PgDn>, if your keyboard
  214.      has them.   The <Insert> key will toggle  between insert mode and
  215.      replace  mode.  There  is  a colon  mode command  (":map", to  be
  216.      described later) which will  allow you to define other keys, such
  217.      as function keys.
  218.  
  219.           A tip: visual command mode looks a lot like text input mode.
  220.      If you forget  which mode you're in, just hit  the <Esc> key.  If
  221.      Elvis beeps,  then you're in visual command  mode.  If Elvis does
  222.      not beep, then  you were in input mode, but  by hitting <Esc> you
  223.      will  have  switched to  visual  command mode.   So,  one way  or
  224.      another, after <Esc> Elvis will be ready for a command.
  225.      COMMAND      DESCRIPTION
  226.             ^A    Search for next occurence of word at cursor (MOVE)(EXT)
  227.             ^B    Move toward the top of the file by 1 screenful
  228.             ^C    --- (usually sends SIGINT, to interupt a command)
  229.      count  ^D    Scroll down <count> lines (default 1/2 screen)
  230.      count  ^E    Scroll up <count> lines
  231.             ^F    Move toward the bottom of the file by 1 screenful
  232.             ^G    Show file status, and the current line #
  233.      count  ^H    Move left, like h (MOVE)
  234.             ^I    ---
  235.      count  ^J    Move down (MOVE)
  236.             ^K    ---
  237.             ^L    Redraw the screen
  238.      count  ^M    Move to the front of the next line (MOVE)
  239.      count  ^N    Move down (MOVE)
  240.             ^O    ---
  241.      count  ^P    Move up (MOVE)
  242.             ^Q    --- (typically XON, which restarts screen updates)
  243.             ^R    Redraw the screen
  244.             ^S    --- (typically XOFF, which stops screen updates)
  245.             ^T    ---
  246.      count  ^U    Scroll up <count> lines (default 1/2 screen)
  247.             ^V    ---
  248.             ^W    ---
  249.      count  ^X    Move to a physical column number on the screen (MOVE) (EXT)
  250.      count  ^Y    Scroll down <count> lines
  251.             ^Z    --- (sometimes sends SIGSUSP, to suspend execution)
  252.             ESC   ---
  253.             ^\    --- (usually sends SIGQUIT, which is ignored)
  254.             ^]    If the cursor is on a tag name, go to that tag
  255.             ^^    Switch to the previous file, like ":e #"
  256.             ^_    ---
  257.      count  SPC   Move right,like l (MOVE)
  258.             ! mv  Run the selected lines thru an external filter program
  259.  
  260.  
  261.  
  262.                                    - 1 -
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.             " key Select which cut buffer to use next
  271.      count  # +   Increment a number (EDIT) (EXT)
  272.             $     Move to the rear of the current line (MOVE)
  273.      count  %     Move to matching (){}[] or to a given % of file (MOVE) (EXT)
  274.      count  &     Repeat the previous ":s//" command here (EDIT)
  275.             ' key Move to a marked line (MOVE)
  276.      count  (     Move backward <count> sentences (MOVE)
  277.      count  )     Move forward <count> sentences (MOVE)
  278.             *     Go to the next error in the errlist (EXT)
  279.      count  +     Move to the front of the next line (MOVE)
  280.      count  ,     Repeat the previous [fFtT] but in the other direction (MOVE)
  281.      count  -     Move to the front of the preceding line (MOVE)
  282.      count  .     Repeat the previous "edit" command
  283.             / textSearch forward for a given regular expression (MOVE)
  284.             0     If not part of count, move to 1st char of this line (MOVE)
  285.             1     Part of count
  286.             2     Part of count
  287.             3     Part of count
  288.             4     Part of count
  289.             5     Part of count
  290.             6     Part of count
  291.             7     Part of count
  292.             8     Part of count
  293.             9     Part of count
  294.             : textRun single EX cmd
  295.      count  ;     Repeat the previous [fFtT] cmd (MOVE)
  296.             < mv  Shift text left (EDIT)
  297.             = mv  Reformat
  298.             > mv  Shift text right (EDIT)
  299.             ? textSearch backward for a given regular expression (MOVE)
  300.             @ key Execute the contents of a cut-buffer as VI commands
  301.      count  A inp Append at end of the line (EDIT)
  302.      count  B     Move back Word (MOVE)
  303.             C inp Change text from the cursor through the end of the line (EDIT)
  304.             D     Delete text from the cursor through the end of the line (EDIT)
  305.      count  E     Move end of Word (MOVE)
  306.      count  F key Move leftward to a given character (MOVE)
  307.      count  G     Move to line #<count> (default is the bottom line) (MOVE)
  308.      count  H     Move to home row (the line at the top of the screen)
  309.      count  I inp Insert at the front of the line (after indents) (EDIT)
  310.      count  J     Join lines, to form one big line (EDIT)
  311.             K     Look up keyword (EXT)
  312.      count  L     Move to last row (the line at the bottom of the screen)
  313.             M     Move to middle row
  314.             N     Repeat previous search, but in the opposite direction (MOVE)
  315.      count  O inp Open up a new line above the current line (EDIT)
  316.             P     Paste text before the cursor (EDIT)
  317.             Q     Quit to EX mode
  318.             R inp Overtype (EDIT)
  319.      count  S inp Change lines, like <count>cc
  320.      count  T key Move leftward *almost* to a given character (MOVE)
  321.             U     Undo all recent changes to the current line
  322.             V     Start marking lines for c/d/y/</>/!/\ (EXT)
  323.      count  W     Move forward <count> Words (MOVE)
  324.      count  X     Delete the character(s) to the left of the cursor (EDIT)
  325.  
  326.  
  327.  
  328.                                    - 2 -
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.      count  Y     Yank text line(s) (copy them into a cut buffer)
  337.             Z Z   Save the file & exit
  338.             [ [   Move back 1 section (MOVE)
  339.             \ mv  Pop-up menu for modifying text (EXT)
  340.             ] ]   Move forward 1 section (MOVE)
  341.             ^     Move to the front of the current line (after indent) (MOVE)
  342.      count  _     Move to the current line
  343.             ` key Move to a marked character (MOVE)
  344.      count  a inp Insert text after the cursor (EDIT)
  345.      count  b     Move back <count> words (MOVE)
  346.             c mv  Change text (EDIT)
  347.             d mv  Delete text (EDIT)
  348.      count  e     Move forward to the end of the current word (MOVE)
  349.      count  f key Move rightward to a given character (MOVE)
  350.             g     ---
  351.      count  h     Move left (MOVE)
  352.      count  i inp Insert text at the cursor (EDIT)
  353.      count  j     Move down (MOVE)
  354.      count  k     Move up (MOVE)
  355.      count  l     Move right (MOVE)
  356.             m key Mark a line or character
  357.             n     Repeat the previous search (MOVE)
  358.      count  o inp Open a new line below the current line (EDIT)
  359.             p     Paste text after the cursor (EDIT)
  360.             q     ---
  361.      count  r key Replace <count> chars by a given character (EDIT)
  362.      count  s inp Replace <count> chars with text from the user (EDIT)
  363.      count  t key Move rightward *almost* to a given character (MOVE)
  364.             u     Undo the previous edit command
  365.             v     Start marking characters for c/d/y/</>/!/\ (EXT)
  366.      count  w     Move forward <count> words (MOVE)
  367.      count  x     Delete the character that the cursor's on (EDIT)
  368.             y mv  Yank text (copy it into a cut buffer)
  369.             z key Scroll current line to the screen's +=top -=bottom .=middle
  370.      count  {     Move back <count> paragraphs (MOVE)
  371.      count  |     Move to column <count> (the leftmost column is 1)
  372.      count  }     Move forward <count> paragraphs (MOVE)
  373.      count  ~     Switch a character between uppercase & lowercase (EDIT)
  374.             DEL   --- (usually mapped to shift-X, so it deletes one character)
  375.  
  376.      count  Many  commands may  be  preceded by  a count.   This is  a
  377.             sequence  of digits  representing a  decimal  number.  For
  378.             most commands  that use a  count, the command  is repeated
  379.             <count> times.  The  count is always optional, and usually
  380.             defaults to 1.
  381.  
  382.      key    Some  commands  require  two  keystrokes.  The  first  key
  383.             always determines  which command  is to be  executed.  The
  384.             second key is used as a parameter to the command.
  385.  
  386.      mv     Some commands  (! < > c  d y \ =)  operate on text between
  387.             the cursor and  some other position.  There are three ways
  388.             that you can specifify that other position.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                                    - 3 -
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.             The first  way is to  follow the command  keystroke with a
  404.             movement  command.   For example,  "dw"  deletes a  single
  405.             word.  "d3w" and "3dw" both delete three words.
  406.  
  407.             The  second way  is to type  the command  keystroke twice.
  408.             This causes  whole lines to  be acted upon.   For example,
  409.             ">>" indents the  current line.  "3>>" indents the current
  410.             line and the following two lines.
  411.  
  412.             The last way is to move the cursor to one end of the text,
  413.             type 'v'  or 'V' to start marking, move  the cursor to the
  414.             other end, and then type the desired command key.
  415.  
  416.      inp    Many commands allow  the user to interactively enter text.
  417.             See  the  discussion  of  "input  mode" in  the  following
  418.             section.
  419.  
  420.      (EXT)  These commands are  extensions -- the real vi doesn't have
  421.             them.
  422.  
  423.      (EDIT) These commands affect text, and may be repeated by the "."
  424.             command.
  425.  
  426.      (MOVE) These commands move the cursor, and may be used to specify
  427.             the extent of a member of the "mv" class of commands.
  428.  
  429.      2.1 Input Mode
  430.  
  431.           You  can't type  text into  your  file directly  from visual
  432.      command mode.  Instead, you  must first give a command which will
  433.      put  you   into  input  mode.   The  commands   to  do  this  are
  434.      A/C/I/O/R/S/a/i/o/s.
  435.  
  436.           The S/s/C/c commands temporarily place a $ at the end of the
  437.      text that they are going to change.
  438.  
  439.           In input mode, all  keystrokes are inserted into the text at
  440.      the cursor's position, except for the following:
  441.           ^A     insert a copy of the last input text
  442.           ^D     delete one indent character
  443.           ^H     (backspace) erase the character before the cursor
  444.           ^L     redraw the screen
  445.           ^M     (carriage return) insert a newline (^J, linefeed)
  446.           ^O     execute next key as a visual command (limited!)
  447.           ^P     insert the contents of the cut buffer
  448.           ^R     redraw the screen, like ^L
  449.           ^T     insert an indent character
  450.           ^U     backspace to the beginning of the line
  451.           ^V     insert the following keystroke, even if special
  452.           ^W     backspace to the beginning of the current word
  453.           ^Z^Z   write the file & exit Elvis
  454.           ^[     (ESCape) exit from input mode, back to command mode
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                    - 4 -
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.           Also, on  some systems, ^S  may stop output,  ^Q may restart
  469.      output, and  ^C may interupt  execution.  ^@ (the  NUL character)
  470.      cannot be inserted.
  471.  
  472.           The R  visual command puts you in overtype  mode, which is a
  473.      slightly different  form of input  mode.  In overtype  mode, each
  474.      time you insert a character, one of the old characters is deleted
  475.      from the file.
  476.  
  477.      2.2 Arrow keys in Input Mode
  478.  
  479.           The arrow keys can be used to move the cursor in input mode.
  480.      (This is an extension; the  real Vi doesn't support arrow keys in
  481.      input mode.)  The <PgUp>, <PgDn>, <Home>, and  <End> keys work in
  482.      input mode, too.  The  <Delete> key deletes a single character in
  483.      input  mode.  The  <Insert> key  toggles  between input  mode and
  484.      replace mode.
  485.  
  486.           The best  thing about allowing  arrow keys to  work in input
  487.      mode is that as long as you're in input mode, Elvis seems to have
  488.      a fairly ordinary  user interface.  With most other text editors,
  489.      you are always in either insert mode or replace mode, and you can
  490.      use the  arrow keys at any  time to move the  cursor.  Now, Elvis
  491.      can act like that, too.  In fact, with the new "inputmode" option
  492.      and the  "control-Z control-Z" input command,  you may never have
  493.      to go into visual command mode for simple edit sessions.
  494.  
  495.      2.3 Digraphs
  496.  
  497.           Elvis  supports  digraphs   as  a  way  to  enter  non-ASCII
  498.      characters.  A  digraph is a  character which is  composed of two
  499.      other characters.   For example, an  apostrophe and the  letter i
  500.      could be defined  as a digraph which is to  be stored & displayed
  501.      as an accented i.
  502.  
  503.           There  is no  single standard  for extended  ASCII character
  504.      sets.   Elvis can  be compiled  to fill  the digraph  with values
  505.      appropriate for  either the IBM PC character  set, or the LATIN-1
  506.      character  set   used  by  X  windows,   or  neither.   (See  the
  507.      discussions of  -DCS_IBMPC and -DCS_LATIN1 in  the CFLAGS section
  508.      of this manual.)  You can view or edit the  digraph table via the
  509.      ":digraph" colon command.
  510.  
  511.           Digraphs will  not be recognized until  you've entered ":set
  512.      digraph".
  513.  
  514.           To actually use a digraph type the first character, then hit
  515.      <Backspace>, and then type the second character.  Elvis will then
  516.      substitute the non-ASCII character in their place.
  517.  
  518.      2.4 Abbreviations
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.                                    - 5 -
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.           Elvis  can  expand abbreviations  for  you.   You define  an
  535.      abbreviation with  the :abbr command, and  then whenever you type
  536.      in  the  abbreviated   form  while  in  input  mode,  Elvis  will
  537.      immediately  replace it  with the  long form.   COBOL programmers
  538.      should find this useful. :-)
  539.  
  540.           Elvis doesn't perform the substitution until you type a non-
  541.      alphanumeric character to mark the  end of the word.  If you type
  542.      a  control-V before that  non-alphanumeric character,  then Elvis
  543.      will not perform the substitution.
  544.  
  545.      2.5 Auto-Indent
  546.  
  547.           With  the ":set  autoindent"  option turned  on, Elvis  will
  548.      automatically insert leading  whitespace at the beginning of each
  549.      new line that you type in.  The leading whitespace is copied from
  550.      the preceding line.
  551.  
  552.           To add  more leading whitespace, type  control-T.  To remove
  553.      some whitespace, type control-D.
  554.  
  555.           If you  ":set noautotab",  then the whitespace  generated by
  556.      control-T  will always  consist of  spaces  -- never  tabs.  Some
  557.      people seem to prefer this.
  558.  
  559.           Elvis' autoindent mode  isn't 100% compatible with vi's.  In
  560.      Elvis, 0^D  and ^^D don't  work, ^U can  wipeout all indentation,
  561.      and sometimes  Elvis will use  a different amount  of indentation
  562.      than vi would.
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.                                    - 6 -
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.      3.  COLON MODE COMMANDS
  601.              LINES               COMMAND   ARGUMENTS
  602.                                  ab[br]    [short] [expanded form]
  603.              [line]              a[ppend][!]
  604.                                  ar[gs]    [files]
  605.                                  cc        [files]
  606.                                  cd[!]     [directory]
  607.              [line][,line]       c[hange]
  608.                                  chd[ir][!][directory]
  609.              [line][,line]       co[py]    line
  610.                                  col[or]   [when] [[light] color] [on color]
  611.              [line][,line]       d[elete]  [x]
  612.                                  dig[raph][!][XX [Y]]
  613.                                  e[dit][!] [file]
  614.                                  er[rlist][!][errlist]
  615.                                  f[ile]    [file]
  616.              [line][,line]       g[lobal]  /regexp/ command
  617.              [line]              i[nsert]
  618.              [line][,line]       j[oin][!]
  619.              [line][,line]       l[ist]
  620.                                  mak[e]    [target]
  621.                                  map[!]    key mapped_to
  622.              [line]              ma[rk]    x
  623.                                  mk[exrc]
  624.              [line][,line]       m[ove]    line
  625.                                  n[ext][!] [files]
  626.                                  N[ext][!]
  627.              [line][,line]       nu[mber]
  628.              [line][,line]       p[rint]
  629.              [line]              pu[t]     [x]
  630.                                  q[uit][!]
  631.              [line]              r[ead]    file
  632.                                  rew[ind][!]
  633.                                  se[t]     [options]
  634.                                  so[urce]  file
  635.              [line][,line]       s[ubstitute]/regexp/replacement/[p][g][c]
  636.                                  ta[g][!]  tagname
  637.                                  una[bbr]  [short]
  638.                                  u[ndo]
  639.                                  unm[ap][!]key
  640.                                  ve[rsion]
  641.              [line][,line]       v[global] /regexp/ command
  642.                                  vi[sual]  [filename]
  643.                                  wq
  644.              [line][,line]       w[rite][!][[>>]file]
  645.                                  x[it][!]
  646.              [line][,line]       y[ank]    [x]
  647.              [line][,line]       !         command
  648.              [line][,line]       <
  649.              [line][,line]       =
  650.              [line][,line]       >
  651.              [line][,line]       &
  652.                                  @          x
  653.  
  654.  
  655.  
  656.  
  657.  
  658.                                    - 1 -
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.           To  use colon  mode commands,  you  must switch  from visual
  667.         command mode to  colon command mode.  The visual mode commands
  668.         to do this are ":" for a single colon command, or "Q" for many
  669.         colon mode commands.
  670.  
  671.         3.1 Line Specifiers
  672.  
  673.           Line  specifiers  are   always  optional.   The  first  line
  674.         specifier  of most  commands usually  defaults to  the current
  675.         line.  The  second line specifier  usually defaults to  be the
  676.         same  as the  first  line specifier.   Exceptions are  :write,
  677.         :global, and  :vglobal, which act on all lines  of the file by
  678.         default, and :!, which acts on no lines by default.
  679.  
  680.           Line specifiers  consist of an absolute  part and a relative
  681.         part.  The absolute part of  a line specifier may be either an
  682.         explicit  line number,  a mark,  a dot  to denote  the current
  683.         line, a dollar sign to denote  the last line of the file, or a
  684.         forward or backward search.
  685.  
  686.           An  explicit  line   number  is  simply  a  decimal  number,
  687.         expressed as a string of digits.
  688.  
  689.           A mark  is typed in  as an apostrophe followed  by a letter.
  690.         Marks must be set before they can be used.  You can set a mark
  691.         in visual command mode by typing  "m" and a letter, or you can
  692.         set it in colon command mode via the "mark" command.
  693.  
  694.           A  forward  search  is  typed  in  as a  regular  expression
  695.         surrounded  by  slash  characters;  searching  begins  at  the
  696.         default  line.  A  backward search  is typed  in as  a regular
  697.         expression surrounded  by question marks;  searching begins at
  698.         the line before the default line.
  699.  
  700.           If  you omit  the absolute  part, then  the default  line is
  701.         used.
  702.  
  703.           The relative part  of a line specifier is typed  as a "+" or
  704.         "-"  character followed  by a decimal  number.  The  number is
  705.         added  to or  subtracted from  the absolute  part of  the line
  706.         specifier to produce the final line number.
  707.  
  708.           As a  special case, the  % character may be  used to specify
  709.         all lines  of the  file.  It  is roughly equivelent  to saying
  710.         1,$.  This can be a handy shortcut.
  711.  
  712.           Some examples:
  713.              :p           print the current line
  714.              :37p         print line 37
  715.              :'gp         print the line which contains mark g
  716.              :/foo/p      print the next line that contains "foo"
  717.              :$p          print the last line of the file
  718.              :20,30p      print lines 20 through 30
  719.              :1,$p        print all lines of the file
  720.              :%p          print all lines of the file
  721.  
  722.  
  723.  
  724.                                    - 2 -
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.              :/foo/-2,+4p print 5 lines around the next "foo"
  733.  
  734.         3.2 Text Entry Commands
  735.              [line] append
  736.              [line][,line] change ["x]
  737.              [line] insert
  738.  
  739.           The append command inserts text after the specified line.
  740.  
  741.           The insert command inserts text before the specified line.
  742.  
  743.           The  change command  copies the  range of  lines into  a cut
  744.         buffer, deletes them, and  inserts new text where the old text
  745.         used to be.
  746.  
  747.           For all of these commands,  you indicate the end of the text
  748.         you're inserting  by hitting  ^D or  by entering a  line which
  749.         contains only a period.
  750.  
  751.         3.3 Cut & Paste Commands
  752.              [line][,line] delete ["x]
  753.              [line][,line] yank ["x]
  754.              [line] put ["x]
  755.              [line][,line] copy line
  756.              [line][,line] to line
  757.              [line][,line] move line
  758.  
  759.           The delete command  copies the specified range of lines into
  760.         a cut buffer, and then deletes them.
  761.  
  762.           The yank command copies  the specified range of lines into a
  763.         cut buffer, but does *not* delete them.
  764.  
  765.           The put  command inserts  text from  a cut buffer  after the
  766.         specified line.
  767.  
  768.           The copy  and to commands yank the  specified range of lines
  769.         and then immediately paste them after some other line.
  770.  
  771.           The move  command deletes the  specified range of  lines and
  772.         then immediately  pastes them after  some other line.   If the
  773.         destination line comes after the deleted text, then it will be
  774.         adjusted automatically to account for the deleted lines.
  775.  
  776.         3.4 Display Text Commands
  777.              [line][,line] print
  778.              [line][,line] list
  779.              [line][,line] number
  780.  
  781.           The print command displays the specified range of lines.
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.                                    - 3 -
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.           The number command displays the lines, with line numbers.
  799.  
  800.           The list  command also displays  them, but it  is careful to
  801.         make control characters visible.
  802.  
  803.         3.5 Global Operations Commands
  804.              [line][,line] global /regexp/ command
  805.              [line][,line] vglobal /regexp/ command
  806.  
  807.           The  global  command  searches  through  the  lines  of  the
  808.         specified  range (or  through the  whole file  if no  range is
  809.         specified) for lines  that contain a given regular expression.
  810.         It then moves the cursor to  each of these lines and runs some
  811.         other command on them.
  812.  
  813.           The vglobal  command is similar,  but it searches  for lines
  814.         that don't contain the regular expression.
  815.  
  816.         3.6 Line Editing Commands
  817.              [line][,line] join[!]
  818.              [line][,line] ! program
  819.              [line][,line] <
  820.              [line][,line] >
  821.              [line][,line] substitute /regexp/replacement/[p][g][c]
  822.              [line][,line] &
  823.  
  824.           The join command  catenates all lines in the specified range
  825.         together  to form  one big  line.   If only  a single  line is
  826.         specified, then the  following line is catenated onto it.  The
  827.         normal ":join"  inserts one or  two spaces between  the lines;
  828.         the ":join!" variation (with a '!') doesn't insert spaces.
  829.  
  830.           The ! command runs an external filter program, and feeds the
  831.         specified range  of lines to  it's stdin.  The  lines are then
  832.         replaced by the output of the filter.  A typical example would
  833.         be ":'a,'z!sort" to sort the lines 'a,'z.
  834.  
  835.           The < and > commands shift the specified range of lines left
  836.         or  right, normally  by  the width  of 1  tab character.   The
  837.         "shiftwidth" option determines the shifting amount.
  838.  
  839.           The substitute command  finds the regular expression in each
  840.         line,  and replaces  it with  the  replacement text.   The "p"
  841.         option causes the altered lines to be printed.  The "g" option
  842.         permits all instances of  the regular expression to be found &
  843.         replaced.   (Without "g",  only the  first occurrence  in each
  844.         line is replaced.) The "c" option asks for confirmation before
  845.         each substitution.
  846.  
  847.           The  & command  repeats the  previous  substitution command.
  848.         Actually, "&"  is equivelent to "s//~/"  with the same options
  849.         as  last time.   It searches for  the last  regular expression
  850.         that you  specified for any purpose, and  replaces it with the
  851.         the same text that was used in the previous substitution.
  852.  
  853.  
  854.  
  855.  
  856.                                    - 4 -
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.         3.7 Undo Command
  865.              undo
  866.  
  867.           The undo  command restores the  file to the state  it was in
  868.         before your most recent command which changed text.
  869.  
  870.         3.8 Configuration & Status Commands
  871.              map[!] [key mapped_to]
  872.              unmap[!] key
  873.              abbr [word expanded_form_of_word]
  874.              unabbr word
  875.              digraph[!] [XX [Y]]
  876.              set [options]
  877.              mkexrc
  878.              [line] mark "x
  879.              visual
  880.              version
  881.              [line][,line] =
  882.              file [file]
  883.              source file
  884.              @ "x
  885.              color [when] [["light"] color] ["on" color]
  886.  
  887.           The map  command allows you to  configure Elvis to recognize
  888.         your function keys,  and treat them as though they transmitted
  889.         some other  sequence of characters.  Normally  this mapping is
  890.         done only  when in the  visual command mode, but  with the [!]
  891.         present  it will  map keys  under input  and replace  modes as
  892.         well.  When this command is given with no arguments, it prints
  893.         a table showing all mappings currently in effect.  When called
  894.         with  two  arguments,  the first  is  the  sequence that  your
  895.         function key really sends, and the second is the sequence that
  896.         you want Elvis to treat it as having sent.  As a special case,
  897.         if  the first  argument is  a number then  Elvis will  map the
  898.         corresponding  function key;  for  example, ":map  7 dd"  will
  899.         cause the <F7> key to delete a line.
  900.  
  901.           The unmap command removes key definitions that were made via
  902.         the map command.
  903.  
  904.           The  abbr  command   is  used  to  define/list  a  table  of
  905.         abbreviations.  The  table contains both  the abbreviated form
  906.         and the  fully spelled-out form.  When  you're in visual input
  907.         mode, and you type in the abbreviated form, Elvis will replace
  908.         the abbreviated  form with  the fully spelled-out  form.  When
  909.         this command is  called without arguments, it lists the table;
  910.         with two or more arguments, the first argument is taken as the
  911.         abbreviated  form, and  the rest  of the  command line  is the
  912.         fully-spelled out form.
  913.  
  914.           The unabbr command deletes entries from the abbr table.
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.                                    - 5 -
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.           The  digraph  command  allows  you  to  display the  set  of
  931.         digraphs  that Elvis  is using, or  add/remove a  digraph.  To
  932.         list  the set  of digraphs,  use the  digraph command  with no
  933.         arguments.   To add  a digraph,  you  should give  the digraph
  934.         command two  arguments.  The first  argument is the  two ASCII
  935.         characters that  are to  be combined;  the second is  the non-
  936.         ASCII   character   that   they  represent.    The   non-ASCII
  937.         character's most  significant bit is automatically  set by the
  938.         digraph command,  unless to  append a  ! to the  command name.
  939.         Removal of  a digraph is  similar to adding  a digraph, except
  940.         that you should leave off the second argument.
  941.  
  942.           The set  command allows you examine  or set various options.
  943.         With no arguments, it displays the values of options that have
  944.         been changed.  With  the single argument "all" it displays the
  945.         values  of all  options,  regardless of  whether they've  been
  946.         explicitly set  or not.  Otherwise, the  arguments are treated
  947.         as options to be set.
  948.  
  949.           The mkexrc command saves the current configuration to a file
  950.         called ".exrc" in the current directory.
  951.  
  952.           The mark command defines a named mark to refer to a specific
  953.         place in  the file.   This mark may  be used later  to specify
  954.         lines for other commands.
  955.  
  956.           The  visual  command  puts  the  editor  into  visual  mode.
  957.         Instead of emulating ex, Elvis will start emulating vi.
  958.  
  959.           The  version command  tells you that  what version  of Elvis
  960.         this is.
  961.  
  962.           The = command tells you  what line you specified, or, if you
  963.         specified a  range of lines,  it will tell  you both endpoints
  964.         and the number of lines included in the range.
  965.  
  966.           The file command tells you  the name of the file, whether it
  967.         has been  modified, the number  of lines in the  file, and the
  968.         current line  number.  You can also use it  to change the name
  969.         of the current file.
  970.  
  971.           The source  command reads a sequence  of colon mode commands
  972.         from a file, and interprets them.
  973.  
  974.           The @  command executes the  contents of a  cut-buffer as EX
  975.         commands.
  976.  
  977.           The color command only works under MS-DOS, or if you have an
  978.         ANSI-compatible  color terminal.   It  allows you  to set  the
  979.         foreground and background  colors for different types of text:
  980.         normal, bold,  italic, underlined, standout,  pop-up menu, and
  981.         visible  selection.   By  default,  it  changes  the  "normal"
  982.         colors;  to change  other colors,  the  first argument  to the
  983.         :color command should be the  first letter of the type of text
  984.         you  want.  The  syntax for  the  colors themselves  is fairly
  985.  
  986.  
  987.  
  988.                                    - 6 -
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.         intuitive.  For  example, ":color  light cyan on  blue" causes
  997.         normal  text  to  be   displayed  in  light  cyan  on  a  blue
  998.         background, and ":color b bright white" causes bold text to be
  999.         displayed  in   bright  white  on  a   blue  background.   The
  1000.         background  color always  defaults to  the  current background
  1001.         color of normal  text.  Your first :color command must specify
  1002.         both the foreground and background for normal text.
  1003.  
  1004.         3.9 Multiple File Commands
  1005.              args [files]
  1006.              next[!] [files]
  1007.              Next[!]
  1008.              previous[!]
  1009.              rewind[!]
  1010.  
  1011.           When you  invoke Elvis from  your shell's command  line, any
  1012.         filenames that  you give to  Elvis as arguments  are stored in
  1013.         the args  list.  The args  command will display  this list, or
  1014.         define a new one.
  1015.  
  1016.           The next command switches  from the current file to the next
  1017.         one in the  args list.  You may specify a  new args list here,
  1018.         too.
  1019.  
  1020.           The Next  and previous commands (they're  really aliases for
  1021.         the  same  command)  switch  from  the  current  file  to  the
  1022.         preceding file in the args list.
  1023.  
  1024.           The  rewind command  switches from the  current file  to the
  1025.         first file in the args list.
  1026.  
  1027.         3.10 Switching Files
  1028.              edit[!] [file]
  1029.              tag[!] tagname
  1030.  
  1031.           The edit  command allows to switch from  the current file to
  1032.         some other  file.  This has nothing to do  with the args list,
  1033.         by the way.
  1034.  
  1035.           The tag  command looks up  a given tagname in  a file called
  1036.         "tags".  This  tells it which file  the tag is in,  and how to
  1037.         find it  in that file.  Elvis then switches  to the tag's file
  1038.         and finds the tag.
  1039.  
  1040.         3.11 Working with a Compiler
  1041.              cc [files]
  1042.              make [target]
  1043.              errlist[!] [errlist]
  1044.  
  1045.           The  cc and  make commands execute  your compiler  or "make"
  1046.         utility  and redirect  any error messages  into a  file called
  1047.         "errlist".  By  default, cc is run on  the current file.  (You
  1048.         should  write  it  before running  cc.)  The  contents of  the
  1049.         "errlist"  file are  then scanned for  error messages.   If an
  1050.         error message  is found, then the cursor is  moved to the line
  1051.  
  1052.  
  1053.  
  1054.                                    - 7 -
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.         where the error was detected, and the description of the error
  1063.         is displayed on the status line.
  1064.  
  1065.           After you've fixed  one error, the errlist command will move
  1066.         the cursor to the next error.  In visual command mode, hitting
  1067.         `*' will do this, too.
  1068.  
  1069.           You can also create an "errlist" file from outside of Elvis,
  1070.         and use "elvis -m" to start Elvis and have the cursor moved to
  1071.         the  first  error.   Note that  you  don't  need  to supply  a
  1072.         filename with "elvis -m" because the error messages always say
  1073.         which source file an error is in.
  1074.  
  1075.           Note: When you  use errlist repeatedly to fix several errors
  1076.         in a single file, it  will attempt to adjust the reported line
  1077.         numbers to allow for  lines that you have inserted or deleted.
  1078.         These adjustments  are made with the  assumption that you will
  1079.         work though the file from the beginning to the end.
  1080.  
  1081.         3.12 Exit Commands
  1082.              quit[!]
  1083.              wq
  1084.              xit
  1085.  
  1086.           The quit  command exits from the  editor without saving your
  1087.         file.
  1088.  
  1089.           The wq command writes your file out, then then exits.
  1090.  
  1091.           The xit  command is similar  to the wq  command, except that
  1092.         xit won't  bother to write  your file if  you haven't modified
  1093.         it.
  1094.  
  1095.         3.13 File I/O Commands
  1096.              [line] read file
  1097.              [line][,line] write[!] [[>>]file]
  1098.  
  1099.           The read command gets  text from another file and inserts it
  1100.         after the  specified line.  It  can also read the  output of a
  1101.         program; simply  precede the program name by a  '!' and use it
  1102.         in place of the file name.
  1103.  
  1104.           The write command writes the whole file, or just part of it,
  1105.         to some other file.  The  !, if present, will permit the lines
  1106.         to be written even if  you've set the readonly option.  If you
  1107.         precede the filename by >>  then the lines will be appended to
  1108.         the file.  You  can send the lines to the  standard input of a
  1109.         program by  replacing the filename with a  '!' followed by the
  1110.         command and its arguments.
  1111.  
  1112.           Note:  Be  careful  not  to  confuse ":w!filename"  and  ":w
  1113.         !command".  To write to a  program, you must have at least one
  1114.         blank before the '!'.
  1115.  
  1116.         3.14 Directory Commands
  1117.  
  1118.  
  1119.  
  1120.                                    - 8 -
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.              cd [directory]
  1129.              chdir [directory]
  1130.              shell
  1131.  
  1132.           The cd and chdir commands (really two names for one command)
  1133.         switch the current working directory.
  1134.  
  1135.           The shell command starts an interactive shell.
  1136.  
  1137.         3.15 Debugging Commands
  1138.              [line][,line] debug[!]
  1139.              validate[!]
  1140.  
  1141.           These commands are  only available if you compile Elvis with
  1142.         the -DDEBUG flag.
  1143.  
  1144.           The  debug command  lists  statistics for  the blocks  which
  1145.         contain the  specified range of  lines.  If the  ! is present,
  1146.         then the contents of those blocks is displayed, too.
  1147.  
  1148.           The validate  command checks certain  variables for internal
  1149.         consistency.   Normally it doesn't  output anything  unless it
  1150.         detects a problem.  With the !, though, it will always produce
  1151.         *some* output.
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.                                    - 9 -
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.      4.  REGULAR EXPRESSIONS
  1195.  
  1196.  
  1197.           Elvis   uses   regular   expressions   for   searching   and
  1198.      substututions.  A  regular expression is  a text string  in which
  1199.      some  characters  have  special  meanings.   This  is  much  more
  1200.      powerful than simple text matching.
  1201.  
  1202.      Syntax
  1203.  
  1204.           Elvis'  regexp package  treats  the following  one- or  two-
  1205.      character strings (called meta-characters) in special ways:
  1206.  
  1207.      \(subexpression\)
  1208.              The  \(  and   \)  metacharacters  are  used  to  delimit
  1209.              subexpressions.   When the  regular expression  matches a
  1210.              particular  chunk  of  text,  Elvis will  remember  which
  1211.              portion  of that  chunk matched  the  subexpression.  The
  1212.              :s/regexp/newtext/ command makes use of this feature.
  1213.  
  1214.      ^       The ^ metacharacter matches the beginning of a line.  If,
  1215.              for example, you wanted to find "foo" at the beginning of
  1216.              a  line,  you  would use  a  regular  expression such  as
  1217.              /^foo/.  Note that ^ is only a metacharacter if it occurs
  1218.              at the beginning  of a regular expression; anyplace else,
  1219.              it is treated as a normal character.
  1220.  
  1221.      $       The $  metacharacter matches  the end  of a line.   It is
  1222.              only  a metacharacter  when  it occurs  at the  end of  a
  1223.              regular expression; elsewhere,  it is treated as a normal
  1224.              character.  For example, the regular expression /$$/ will
  1225.              search for a dollar sign at the end of a line.
  1226.  
  1227.      \<      The \< metacharacter  matches a zero-length string at the
  1228.              beginning of a word.  A word is considered to be a string
  1229.              of 1 or more letters and digits.  A word can begin at the
  1230.              beginning of  a line or after  1 or more non-alphanumeric
  1231.              characters.
  1232.  
  1233.      \>      The \> metacharacter  matches a zero-length string at the
  1234.              end of a word.  A word  can end at the end of the line or
  1235.              before  1  or   more  non-alphanumeric  characters.   For
  1236.              example, /\<end\>/  would find  any instance of  the word
  1237.              "end",  but would  ignore any  instances of  e-n-d inside
  1238.              another word such as "calendar".
  1239.  
  1240.      .       The . metacharacter matches any single character.
  1241.  
  1242.      [character-list]
  1243.              This  matches any  single character  from  the character-
  1244.              list.  Inside  the character-list, you can  denote a span
  1245.              of  characters  by   writing  only  the  first  and  last
  1246.              characters,   with  a  hyphen   between  them.    If  the
  1247.              character-list  is preceded  by a  ^ character,  then the
  1248.              list is  inverted -- it  will match character  that isn't
  1249.  
  1250.  
  1251.  
  1252.                                    - 1 -
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.              mentioned in  the list.  For  example, /[a-zA-Z]/ matches
  1261.              any  letter, and  /[^ ]/  matches  anything other  than a
  1262.              blank.
  1263.  
  1264.      \{n\}   This is a closure  operator, which means that it can only
  1265.              be   placed  after  something   that  matches   a  single
  1266.              character.   It controls  the  number of  times that  the
  1267.              single-character expression should be repeated.
  1268.  
  1269.              The  \{n\}  operator,   in  particular,  means  that  the
  1270.              preceding expression should  be repeated exactly n times.
  1271.              For  example,  /^-\{80\}$/   matches  a  line  of  eighty
  1272.              hyphens, and  /\<[a-zA-Z]\{4\}\>/ matches any four-letter
  1273.              word.
  1274.  
  1275.      \{n,m\} This is a closure operator which means that the preceding
  1276.              single-character expression should  be repeated between n
  1277.              and m  times, inclusive.   If the  m is omitted  (but the
  1278.              comma is  present) then m is taken  to be inifinity.  For
  1279.              example, /"[^"]\{3,5\}"/ matches any pair of quotes which
  1280.              contains three, four, or five non-quote characters.
  1281.  
  1282.      *       The  * metacharacter  is a  closure operator  which means
  1283.              that  the preceding  single-character  expression can  be
  1284.              repeated zero or more times.  It is equivelent to \{0,\}.
  1285.              For example, /.*/ matches a whole line.
  1286.  
  1287.      \+      The \+  metacharacter is  a closure operator  which means
  1288.              that  the preceding  single-character  expression can  be
  1289.              repeated one or  more times.  It is equivelent to \{1,\}.
  1290.              For example, /.\+/ matches  a whole line, but only if the
  1291.              line contains  at least one character.   It doesn't match
  1292.              empty lines.
  1293.  
  1294.      \?      The  \?   metacharacter  is  a   closure  operator  which
  1295.              indicates that  the preceding single-character expression
  1296.              is optional --  that is, that it can occur  0 or 1 times.
  1297.              It is equivelent  to \{0,1\}.  For example, /no[ -]\?one/
  1298.              matches "no one", "no-one", or "noone".
  1299.  
  1300.           Anything else  is treated as  a normal character  which must
  1301.      exactly  match a  character from the  scanned text.   The special
  1302.      strings may  all be preceded by  a backslash to force  them to be
  1303.      treated normally.
  1304.  
  1305.      Substitutions
  1306.  
  1307.           The  :s  command  has  at  least  two arguments:  a  regular
  1308.      expression, and a substitution string.  The text that matched the
  1309.      regular expression is replaced  by text which is derived from the
  1310.      substitution string.
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.                                    - 2 -
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.           Most characters  in the substitution string  are copied into
  1328.      the text literally but a few have special meaning:
  1329.              &    Insert a copy of the original text
  1330.              ~    Insert a copy of the previous replacement text
  1331.              \1   Insert a copy of that portion of the original text which
  1332.                   matched the first set of \( \) parentheses
  1333.              \2-\9Do the same for the second (etc.) pair of \( \)
  1334.              \U   Convert all chars of any later & or \# to uppercase
  1335.              \L   Convert all chars of any later & or \# to lowercase
  1336.              \E   End the effect of \U or \L
  1337.              \u   Convert the first char of the next & or \# to uppercase
  1338.              \l   Convert the first char of the next & or \# to lowercase
  1339.  
  1340.           These may  be preceded  by a backslash  to force them  to be
  1341.      treated normally.   If "nomagic" mode is in effect,  then & and ~
  1342.      will be  treated normally, and you  must write them as  \& and \~
  1343.      for them to have special meaning.
  1344.  
  1345.      Options
  1346.  
  1347.           Elvis  has   two  options  which  affect   the  way  regular
  1348.      expressions are  used.  These options may be  examined or set via
  1349.      the :set command.
  1350.  
  1351.           The first  option is called "[no]magic".   This is a boolean
  1352.      option,  and it  is "magic"  (TRUE) by  default.  While  in magic
  1353.      mode, all  of the meta-characters behave  as described above.  In
  1354.      nomagic mode, only ^ and $ retain their special meaning.
  1355.  
  1356.           The  second option  is called  "[no]ignorecase".  This  is a
  1357.      boolean  option, and  it  is "noignorecase"  (FALSE) by  default.
  1358.      While  in  ignorecase  mode,  the  searching mechanism  will  not
  1359.      distinguish between  an uppercase letter and  its lowercase form.
  1360.      In  noignorecase mode,  uppercase  and lowercase  are treated  as
  1361.      being different.
  1362.  
  1363.           Also, the "[no]wrapscan" option affects searches.
  1364.  
  1365.      Examples
  1366.  
  1367.           This example changes every occurence of "utilize" to "use":
  1368.  
  1369.                :%s/utilize/use/g
  1370.  
  1371.           This example  deletes all whitespace that  occurs at the end
  1372.      of a  line anywhere in the file.  (The  brackets contain a single
  1373.      space and a single tab.):
  1374.  
  1375.                :%s/[   ]\+$//
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.                                    - 3 -
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.           This example converts the current line to uppercase:
  1393.  
  1394.                :s/.*/\U&/
  1395.  
  1396.           This example underlines  each letter in the current line, by
  1397.      changing it into an "underscore backspace letter" sequence.  (The
  1398.      ^H is entered as "control-V backspace".):
  1399.  
  1400.                :s/[a-zA-Z]/_^H&/g
  1401.  
  1402.           This example locates the last colon in a line, and swaps the
  1403.      text before  the colon with the text after  the colon.  The first
  1404.      \( \) pair is used to delimit the stuff before the colon, and the
  1405.      second pair  delimit the stuff after.   In the substitution text,
  1406.      \1 and \2 are given in reverse order to perform the swap:
  1407.  
  1408.                :s/\(.*\):\(.*\)/\2:\1/
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                                    - 4 -
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.      5.  OPTIONS
  1459.  
  1460.           Options may be set  or examined via the colon command "set".
  1461.      The  values  of  options  will  affect  the  operation  of  later
  1462.      commands.
  1463.  
  1464.           For convenience,  options have both a  long descriptive name
  1465.      and a short name which is  easy to type.  You may use either name
  1466.      interchangably.  I like the short names, myself.
  1467.  
  1468.           There  are  three types  of  options:  Boolean, string,  and
  1469.      numeric.  Boolean options are made TRUE by giving the name of the
  1470.      option as  an argument to the "set" command;  they are made FALSE
  1471.      by prefixing  the name with "no".   For example, "set autoindent"
  1472.      makes the autoindent option TRUE, and "set noautoindent" makes it
  1473.      FALSE.   Elvis  also  allows boolean  options  to  be toggled  by
  1474.      prefixing the name with  "neg".  So, ":map g :set neglist^M" will
  1475.      cause the <g> key to  alternately toggle the "list" option on and
  1476.      off.   (The "neg"  prefix is  an extension;  the real  vi doesn't
  1477.      support it.)
  1478.  
  1479.           To change the value of  a string or numeric option, pass the
  1480.      "set" command the name of the option, followed by an "=" sign and
  1481.      the option's  new value.  For example,  "set tabstop=8" will give
  1482.      the tabstop  option a  value of 8.   For string options,  you may
  1483.      enclose the new value in quotes.
  1484.      NAMES              TYPE DEFAULT       MEANING
  1485.      autoindent, ai     Bool noai          auto-indent during input
  1486.      autoprint, ap      Bool ap            in EX, print the current line
  1487.      autotab, at        Bool at            auto-indent allowed to use tabs?
  1488.      autowrite, aw      Bool noaw          auto-write when switching files
  1489.      beautify,  bf      Bool nobf          strip control chars from file?
  1490.      charattr, ca       Bool noca          interpret \fX sequences?
  1491.      cc, cc             Str  cc="cc -c"    name of the C compiler
  1492.      columns, co        Num  co=80         width of the screen
  1493.      digraph, dig       Bool nodig         recognize digraphs?
  1494.      directory, dir     Str  dir="/usr/tmp"where tmp files are kept
  1495.      edcompatible, ed   Bool noed          remember ":s//" options
  1496.      equalprg, ep       Bool ep="fmt"      program to run for = operator
  1497.      errorbells, eb     Bool eb            ring bell on error
  1498.      exrc, exrc         Bool noexrc        read "./.exrc" file?
  1499.      exrefresh, er      Bool er            write lines indiviually in EX
  1500.      flash, vbell       Bool flash         use visible alternative to bell
  1501.      flipcase, fc       Str  fc=""         non-ASCII chars flipped by ~
  1502.      hideformat, hf     Bool hf            hide text formatter commands
  1503.      ignorecase, ic     Bool noic          upper/lowercase match in search
  1504.      inputmode, im      Bool noim          start vi in insert mode?
  1505.      keytime, kt        Num  kt=2          timeout for mapped key entry
  1506.      keywordprg, kp     Str  kp="ref"      full pathname of shift-K prog
  1507.      lines, ln          Num  ln=25         number of lines on the screen
  1508.      list, li           Bool noli          display lines in "list" mode
  1509.      magic, ma          Bool ma            use regular expression in search
  1510.      make, mk           Str  mk="make"     name of the "make" program
  1511.      mesg, ms           Bool ms            allow messages from other users?
  1512.      modelines, ml      Bool noml          are modelines processed?
  1513.  
  1514.  
  1515.  
  1516.                                    - 1 -
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.      more, more         Bool more          pause between messages?
  1525.      nearscroll, ns     Num  ns=15         when to scroll vs. redraw
  1526.      novice, nov        Bool nonovice      set options for ease of use
  1527.      number, nu         Bool nonumber      show line numbers
  1528.      paragraphs, para   Str  para="PPppIPLPQP"names of "paragraph" nroff cmd
  1529.      prompt, pr         Bool pr            show ':' prompt in ex mode
  1530.      readonly, ro       Bool noro          prevent overwriting of orig file
  1531.      remap, rem         Bool remap         allow key maps to call key maps
  1532.      report, re         Num  re=5          report when 5 or more changes
  1533.      ruler, ru          Bool noru          display line/column numbers
  1534.      scroll, sc         Num  sc=12         scroll amount for ^U and ^D
  1535.      sections, sect     Str  sect="NHSHSSSEse"names of "section" nroff cmd
  1536.      shell, sh          Str  sh="/bin/sh"  full pathname of the shell
  1537.      showmatch, sm      Bool nosm          show matching ()[]{}
  1538.      showmode, smd      Bool nosmd         say when we're in input mode
  1539.      shiftwidth, sw     Num  sw=8          shift amount for < and >
  1540.      sidescroll, ss     Num  ss=8          amount of sideways scrolling
  1541.      sync, sy           Bool nosy          call sync() often
  1542.      tabstop, ts        Num  ts=8          width of tab characters
  1543.      taglength, tl      Num  tl=0          significant chars in tag name
  1544.      tags, tag          Str  tags="tags" list of tags files
  1545.      tagstack, tgs      Bool tgs           enable tagstack?
  1546.      term, te           Str  te="$TERM"    name of the termcap entry
  1547.      terse, tr          Bool notr          give shorter error messages
  1548.      timeout, to        Bool to            distinguish <esc> from <arrow>?
  1549.      warn, wa           Bool wa            warn for ! if file modified
  1550.      window, wi         Num  wi=24         lines to redraw after long move
  1551.      wrapmargin, wm     Num  wm=0          wrap long lines in input mode
  1552.      wrapscan, ws       Bool ws            at EOF, searches wrap to line 1
  1553.      writeany, wr       Bool nowr          allow :w to clobber files
  1554.  
  1555.      autoindent, ai
  1556.           During  input mode,  the autoindent  option will  cause each
  1557.           added  line  to  begin  with  the  same  amount  of  leading
  1558.           whitespace as the  line above it.  Without autoindent, added
  1559.           lines are initially empty.
  1560.  
  1561.      autoprint, ap
  1562.           This option  only affects EX mode.   If the autoprint option
  1563.           on, and  either the cursor has moved to  a different line or
  1564.           the  previous command  modified  the file,  then Elvis  will
  1565.           print the current line.
  1566.  
  1567.      autotab, at
  1568.           This option  affects the  behaviour of the  autoindent mode.
  1569.           If autoindent is turned off, then autotab has no effect.
  1570.  
  1571.           When  autotab is  turned  on, elvis  will use  a mixture  of
  1572.           spaces and tabs  to create the proper amount of indentation.
  1573.           This is the default.
  1574.  
  1575.           When autotab  is turned off, elvis will  only use spaces for
  1576.           auto-indent.  Elvis  will still insert a  real tab character
  1577.           when you hit the  <Tab> key, though; the autotab option only
  1578.           affects automatic indentation.
  1579.  
  1580.  
  1581.  
  1582.                                    - 2 -
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.      autowrite, aw
  1592.           When you're editing one file and decide to switch to another
  1593.           - via the :tag command,  or :next command, perhaps - if your
  1594.           current  file has  been modified,  then Elvis  will normally
  1595.           print an error message and refuse to switch.
  1596.  
  1597.           However,  if the  autowrite option  is  on, then  Elvis will
  1598.           write  the   modified  version  of  the   current  file  and
  1599.           successfully switch to the new file.
  1600.  
  1601.      beautify, bf
  1602.           This option causes all control characters to be deleted from
  1603.           the text  file, at the  time when you start  editing it.  If
  1604.           you're already editing a  file when you turn on the beautify
  1605.           option, then that file won't be affected.
  1606.  
  1607.      cc   The :cc command runs  the C compiler.  This option should be
  1608.           set to the name of your compiler.
  1609.  
  1610.      charattr, ca
  1611.           Many  text  formatting   programs  allow  you  to  designate
  1612.           portions  of  your text  to  be  underlined, italicized,  or
  1613.           boldface by embedding  the special strings \fU, \fI, and \fB
  1614.           in  your text.   The  special string  \fP marks  the end  of
  1615.           underlined or boldface text.
  1616.  
  1617.           Elvis normally  treats those  special strings just  like any
  1618.           other text.
  1619.  
  1620.           However,  if the  charattr  option is  on,  then Elvis  will
  1621.           interpret  those  special   strings  correctly,  to  display
  1622.           underlined  or  boldface text  on  the  screen.  (This  only
  1623.           works, of  course, if  your terminal can  display underlined
  1624.           and boldface, and if the TERMCAP entry says how to do it.)
  1625.  
  1626.      columns, co
  1627.           This option shows how wide your screen is.
  1628.  
  1629.      digraph, dig
  1630.           This  option  is   used  to  enable/disable  recognition  of
  1631.           digraphs.  The default  value is nodigraph, which means that
  1632.           digraphs will not be recognized.
  1633.  
  1634.      directory, dir
  1635.           Elvis stores  text in  temporary files.  This  option allows
  1636.           you to  control which  directory those temporary  files will
  1637.           appear in.  The default is /usr/tmp.
  1638.  
  1639.           This option  can only  be set in  a .exrc file;  after that,
  1640.           Elvis will  have already  started making temporary  files in
  1641.           some other directory, so it would be too late.
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.                                    - 3 -
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.      edcompatible, ed
  1658.           This    option     affects    the    behaviour     of    the
  1659.           ":s/regexp/text/options" command.   It is normally  off (:se
  1660.           noed) which causes all of the substitution options to be off
  1661.           unless explicitly given.
  1662.  
  1663.           However,  with edcompatible  on (:se  ed),  the substitution
  1664.           command remembers  which options you used  last time.  Those
  1665.           same options will continue to be used until you change them.
  1666.           In edcompatible mode, when you explicitly give the name of a
  1667.           substitution  option,  you will  toggle  the  state of  that
  1668.           option.
  1669.  
  1670.           This all  seems very strange  to me, but  its implementation
  1671.           was almost free when I  added the ":&" command to repeat the
  1672.           previous substitution, so there it is.
  1673.  
  1674.      equalprg, ep
  1675.           This  holds the  name  & arguments  of  the external  filter
  1676.           program used  the the visual =  operator.  The defualt value
  1677.           is "fmt", so the = operator will adjust line breaks in text.
  1678.  
  1679.      errorbells, eb
  1680.           Elvis  normally rings  a bell when  you do  something wrong.
  1681.           This option lets you disable the bell.
  1682.  
  1683.      exrc This option  specifies whether a  .exrc file in  the current
  1684.           directory should  be executed.   By default, this  option is
  1685.           off  (":set  noexrc") which  prevents  elvis from  executing
  1686.           .exrc in  the current directory.  If the  .exrc file in your
  1687.           home directory  turns this option on  (":set exrc") then the
  1688.           Elvis will attempt to  execute the .exrc file in the current
  1689.           directory.
  1690.  
  1691.           This  option exist  mainly  for security  reasons.  A  mean-
  1692.           spirited person could do something like
  1693.                echo >/tmp/.exrc '!rm -rf $HOME'
  1694.           and then anybody who attempted to edit or view a file in the
  1695.           /tmp  directory would  lose most of  their files.   With the
  1696.           exrc option turned off, this couldn't happen to you.
  1697.  
  1698.      exrefresh, er
  1699.           The EX  mode of Elvis writes many lines  to the screen.  You
  1700.           can  make  Elvis  either  write  each  line  to  the  screen
  1701.           separately,  or save  up many  lines and  write them  all at
  1702.           once.
  1703.  
  1704.           The exrefresh option is normally on, so each line is written
  1705.           to the screen separately.
  1706.  
  1707.           You may wish to turn  the exrefresh option off (:se noer) if
  1708.           the "write"  system call  is costly  on your machine,  or if
  1709.           you're   using    a   windowing   environment.    (Windowing
  1710.           environments scroll  text a lot  faster when you  write many
  1711.  
  1712.  
  1713.  
  1714.                                    - 4 -
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.           lines at once.)
  1723.  
  1724.           This option  has no effect  in visual command  mode or input
  1725.           mode.
  1726.  
  1727.      flash, vbell
  1728.           If  your termcap  entry describes  a visible  alternative to
  1729.           ringing  your terminal's  bell,  then this  option will  say
  1730.           whether the  visible version gets used  or not.  Normally it
  1731.           will be.
  1732.  
  1733.           If your termcap  does NOT include a visible bell capability,
  1734.           then the flash option will be off, and you can't turn it on.
  1735.  
  1736.      flipcase, fc
  1737.           The flipcase option  allows you to control how the non-ASCII
  1738.           characters are altered by the "~" command.
  1739.  
  1740.           The string is divided into pairs of characters.  When "~" is
  1741.           applied  to  a  non-ASCII  character,  Elvis  looks  up  the
  1742.           character in the flipcase  string to see which pair it's in,
  1743.           and replaces it by the other character of the pair.
  1744.  
  1745.      hideformat, hf
  1746.           Many text formatters require you to embed format commands in
  1747.           your text, on lines  that start with a "." character.  Elvis
  1748.           normally displays  these lines like  any other text,  but if
  1749.           the hideformat option is on, then format lines are displayed
  1750.           as blank lines.
  1751.  
  1752.      ignorecase, ic
  1753.           Normally, when Elvis  searches for text, it treats uppercase
  1754.           letters as being different for lowercase letters.
  1755.  
  1756.           When the  ignorecase option  is on, uppercase  and lowercase
  1757.           are treated as equal.
  1758.  
  1759.      inputmode, im
  1760.           This  option allows  you to  have Elvis  start up  in insert
  1761.           mode.  You can still exit insert mode at any time by hitting
  1762.           the ESC key, as usual.  Usually, this option would be set in
  1763.           your ".exrc" file.
  1764.  
  1765.      keytime, kt
  1766.           The  arrow keys  of  most terminals  send a  multi-character
  1767.           sequence.  It  takes a measurable  amount of time  for these
  1768.           sequences to be  transmitted.  The keytime option allows you
  1769.           to control the maximum amount  of time to allow for an arrow
  1770.           key (or other mapped key) to be received in full.
  1771.  
  1772.           On most  systems, the setting  is the number of  tenths of a
  1773.           second to allow  between characters.  On some other systems,
  1774.           the setting is in whole seconds.
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.                                    - 5 -
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           Try  to avoid  setting keytime=1.   Most systems  just count
  1790.           clock beats,  so if  you tried  to read a  character shortly
  1791.           before a  clock beat, you could allow almost  no time at all
  1792.           for  reading the characters.   For higher  keytime settings,
  1793.           the difference is less critical.
  1794.  
  1795.           If your  system's response time  is poor, you  might want to
  1796.           increase the  keytime.  In particular, I've  found that when
  1797.           keystrokes must  be sent through  a network (via  X windows,
  1798.           rlogin, or telnet, for example) the keytime should be set to
  1799.           at least 1 second.
  1800.  
  1801.           As a special case, you can  set keytime to 0 to disable this
  1802.           time limit  stuff altogether.  The  big problem here  is: If
  1803.           your  arrow keys'  sequences start with  an ESC,  then every
  1804.           time you hit your ESC key Elvis will wait... and wait...  to
  1805.           see if maybe that ESC was part of an arrow key's sequence.
  1806.  
  1807.           NOTE: this option  is a generalization of the timeout option
  1808.           of the real vi.
  1809.  
  1810.      keywordprg, kp
  1811.           Elvis has  a special keyword  lookup feature.  You  move the
  1812.           cursor onto a word,  and hit shift-K, and Elvis uses another
  1813.           program to  look up the  word and display  information about
  1814.           it.
  1815.  
  1816.           This option says which program gets run.
  1817.  
  1818.           The  default  value of  this  option is  "ref",  which is  a
  1819.           program that looks up the definition of a function in C.  It
  1820.           looks up the function name  in a file called "refs" which is
  1821.           created by ctags.
  1822.  
  1823.           You  can  subtitute  other  programs,  such  as  an  English
  1824.           dictionary  program or  the online  manual.  Elvis  runs the
  1825.           program,  using  the  keyword  as  its only  argument.   The
  1826.           program should  write information to  stdout.  The program's
  1827.           exit status should be 0, unless you want Elvis to print "<<<
  1828.           failed >>>".
  1829.  
  1830.      lines, ln
  1831.           This option says how many lines you screen has.
  1832.  
  1833.      list, li
  1834.           In  nolist mode  (the  default), Elvis  displays  text in  a
  1835.           "normal"  manner --  with  tabs expanded  to an  appropriate
  1836.           number of spaces, etc.
  1837.  
  1838.           However,  sometimes  it is  useful  to  have tab  characters
  1839.           displayed differently.  In  list mode, tabs are displayed as
  1840.           "^I", and a "$" is displayed at the end of each line.
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.                                    - 6 -
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.      magic, ma
  1856.           The   search  mechanism   in  Elvis   can   accept  "regular
  1857.           expressions"  -- strings  in which  certain  characters have
  1858.           special meaning.
  1859.  
  1860.           The  magic  option   is  normally  on,  which  causes  these
  1861.           characters to be treated specially.
  1862.  
  1863.           If  you  turn the  magic  option off  (:se  noma), then  all
  1864.           characters except  ^ and $  are treated literally.   ^ and $
  1865.           retain their  special meanings regardless of  the setting of
  1866.           magic.
  1867.  
  1868.      make, mk
  1869.           The  :make command  runs your  "make" program.   This option
  1870.           defines the name of your "make" program.
  1871.  
  1872.      mesg With  the real  vi, running under  real UNIX,  ":set nomesg"
  1873.           would prevent other  users from sending you messages.  Elvis
  1874.           ignores it, though.
  1875.  
  1876.      modelines, ml
  1877.           Elvis  supports  modelines.  Modelines  are  lines near  the
  1878.           beginning   or  end   of  your   text  file   which  contain
  1879.           "ex:yowza:",  where "yowza"  is any  EX command.   A typical
  1880.           "yowza"  would  be  something  like  "set ts=5  ca  kp=spell
  1881.           wm=15".  Other  text may also  appear on a  modeline, so you
  1882.           can place the "ex:yowza:" in a comment:
  1883.           /* ex:set sw=4 ai: */
  1884.  
  1885.           Normally these lines  are ignored, for security reasons, but
  1886.           if you have "set  modelines" in your .exrc file then "yowza"
  1887.           is executed.
  1888.  
  1889.      nearscroll, ns
  1890.           The  line that  contains the  cursor will  always be  on the
  1891.           screen.  If you move the cursor  to a line that isn't on the
  1892.           screen, then elvis  will either scroll (if the cursor's line
  1893.           is  nearly  on  the screen  already)  or  redraw the  screen
  1894.           completely with  the cursor's  line centered (if  the cursor
  1895.           line is not near the screen already).
  1896.  
  1897.           This option allows you  to control elvis' idea of "near".  A
  1898.           value of 15  is typical.  A value of 1  would cause elvis to
  1899.           scroll  no  more  that one  line.   A  value  of 0  disables
  1900.           scrolling.
  1901.  
  1902.      novice, nov
  1903.           The  command ":set  novice" is  equivelent to  ":set nomagic
  1904.           report=1 showmode".
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.                                    - 7 -
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.      number, nu
  1922.           The "number" option  causes Elvis to display line numbers at
  1923.           the start  of each line.  The numbers  are not actually part
  1924.           of  the text;  when  the file  is  written out,  it will  be
  1925.           written without line numbers.
  1926.  
  1927.      paragraphs, pa
  1928.           The { and } commands  move the cursor forward or backward in
  1929.           increments of one paragraph.  Paragraphs may be separated by
  1930.           blank  lines, or  by a  "dot" command  of a  text formatter.
  1931.           Different  text  formatters  use different  "dot"  commands.
  1932.           This option allows you  to configure Elvis to work with your
  1933.           text formatter.
  1934.  
  1935.           It is  assumed that your formatter  uses commands that start
  1936.           with a "." character at the front of a line, and then have a
  1937.           one- or two-character command name.
  1938.  
  1939.           The value of the paragraphs option is a string in which each
  1940.           pair  of  characters  is  one  possible  form of  your  text
  1941.           formatter's paragraph command.
  1942.  
  1943.      more When Elvis must display a sequence of messages at the bottom
  1944.           line of the screen  in visual mode, it normally pauses after
  1945.           all but the last one, so you have time to read them all.
  1946.  
  1947.           If  you turn  off  the "more"  option, then  Elvis will  not
  1948.           pause.  This  means you can only read  the last message, but
  1949.           it is usually the most important one anyway.
  1950.  
  1951.      prompt, pr
  1952.           If you ":set noprompt", then Elvis will no longer emit a ':'
  1953.           when  it expects  you to  type  in an  ex command.   This is
  1954.           slightly useful  if you're using an  astonishingly slow UNIX
  1955.           machine, but the rest of us can just ignore this one.
  1956.  
  1957.      readonly, ro
  1958.           Normally, Elvis  will let you  write back any  file to which
  1959.           you  have  write   permission.   If  you  don't  have  write
  1960.           permission, then  you can only write  the changed version of
  1961.           the file to a different file.
  1962.  
  1963.           If you set the  readonly option, then Elvis will pretend you
  1964.           don't have  write permission  to any  file you edit.   It is
  1965.           useful when you  really only mean to use Elvis  to look at a
  1966.           file,  not  to change  it.   This way  you  can't change  it
  1967.           accidentally.
  1968.  
  1969.           This option is normally off, unless you use the "view" alias
  1970.           of  Elvis.  "View"  is like  "vi"  except that  the readonly
  1971.           option is on.
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                                    - 8 -
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.      remapThe ":map"  command allows you  to convert one  key sequence
  1988.           into another.   The remap option allows  you to specify what
  1989.           should happen if portions of that other sequence are also in
  1990.           the map  table.  If  remap is  on, then those  portions will
  1991.           also  be mapped,  just  as if  they  had been  typed on  the
  1992.           keyboard.  If remap  is off, then the matching portions will
  1993.           not be mapped.
  1994.  
  1995.           For example, if you enter  the commands ":map A B" and ":map
  1996.           B C", then when remap is  on, A will be converted to C.  But
  1997.           when remap is off, A will be converted only to B.
  1998.  
  1999.      report, re
  2000.           Commands in Elvis  may affect many lines.  For commands that
  2001.           affect a  lot of lines,  Elvis will output  a message saying
  2002.           what was done and how many lines were affected.  This option
  2003.           allows  you to  define  what "a  lot of  lines" means.   The
  2004.           default is  5, so any command which affects  5 or more lines
  2005.           will cause a message to be shown.
  2006.  
  2007.      ruler, ru
  2008.           This option is normally off.   If you turn it on, then Elvis
  2009.           will  constantly  display  the  line/column numbers  of  the
  2010.           cursor, at the bottom of the screen.
  2011.  
  2012.      scroll, sc
  2013.           The ^U  and ^D keys  normally scroll backward  or forward by
  2014.           half a screenful, but this is adjustable.  The value of this
  2015.           option says how many  lines those keys should scroll by.  If
  2016.           you  invoke ^U  or ^D  with a  count argument  (for example,
  2017.           "33^D") then this option's value is set to the count.
  2018.  
  2019.      sections, se
  2020.           The [[  and ]] commands move the  cursor backward or forward
  2021.           in increments of 1  section.  Sections may be delimited by a
  2022.           { character in column 1  (which is useful for C source code)
  2023.           or by means of a text formatter's "dot" commands.
  2024.  
  2025.           This option allows you  to configure Elvis to work with your
  2026.           text formatter's "section"  command, in exectly the same way
  2027.           that  the   paragraphs  option   makes  it  work   with  the
  2028.           formatter's "paragraphs" command.
  2029.  
  2030.      shell, sh
  2031.           When  Elvis forks  a  shell (perhaps  for the  :! or  :shell
  2032.           commands) this is the program that is uses as a shell.  This
  2033.           is "/bin/sh"  by default, unless you have  set the SHELL (or
  2034.           COMSPEC, for MS-DOS) environment variable, it which case the
  2035.           default value is copied from the environment.
  2036.  
  2037.      shiftwidth, sw
  2038.           The  < and  >  commands shift  text  left or  right by  some
  2039.           uniform  number of columns.   The shiftwidth  option defines
  2040.           that "uniform number".  The default is 8.
  2041.  
  2042.  
  2043.  
  2044.                                    - 9 -
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.      showmatch, sm
  2054.           With showmatch set, in input  mode every time you hit one of
  2055.           )}], Elvis will  momentarily move the cursor to the matching
  2056.           ({[.
  2057.  
  2058.      showmode, smd
  2059.           In visual  mode, it is easy to forget  whether you're in the
  2060.           visual  command mode or  input/replace mode.   Normally, the
  2061.           showmode option  is off, and you haven't a  clue as to which
  2062.           mode you're in.  If you turn the showmode option on, though,
  2063.           a little message  will appear in the lower right-hand corner
  2064.           of your screen, telling you which mode you're in.
  2065.  
  2066.      sidescroll, ss
  2067.           For long lines,  Elvis scrolls sideways.  (This is different
  2068.           from  the  real vi,  which  wraps a  single  long line  onto
  2069.           several rows of the screen.)
  2070.  
  2071.           To minimize  the number of  scrolls needed, Elvis  moves the
  2072.           screen sideways by  several characters at a time.  The value
  2073.           of this option says how many characters' widths to scroll at
  2074.           a time.
  2075.  
  2076.           Generally, the faster  your screen can be redrawn, the lower
  2077.           the value you will want in this option.
  2078.  
  2079.      sync, sy
  2080.           If the  system crashes during an edit  session, then most of
  2081.           your  work can  be recovered  from  the temporary  file that
  2082.           Elvis uses to store changes.  However, sometimes the OS will
  2083.           not copy  changes to the hard  disk immediately, so recovery
  2084.           might not be possible.  The [no]sync option lets you control
  2085.           this.
  2086.  
  2087.           In nosync mode (which  is the default, for UNIX), Elvis lets
  2088.           the  operating system  control when data  is written  to the
  2089.           disk.  This is generally faster.
  2090.  
  2091.           In sync mode (which is the default for MS-DOS, AmigaDos, and
  2092.           Atari TOS), Elvis forces  all changes out to disk every time
  2093.           you make a change.  This is generally safer, but slower.  It
  2094.           can  also be  a  rather rude  thing  to do  on a  multi-user
  2095.           system.
  2096.  
  2097.      tabstop, ts
  2098.           Tab characters  are normally 8 characters  wide, but you can
  2099.           change their widths by means of this option.
  2100.  
  2101.      taglength, tl
  2102.           This option  allows you to specify how  many characters of a
  2103.           tag's  name must  match when  performing  tag lookup.   As a
  2104.           special case,  ":set taglength=0" means  that all characters
  2105.           of a tag's name must match.
  2106.  
  2107.  
  2108.  
  2109.  
  2110.                                    - 10 -
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.           Note:  some  configurations  of  Elvis  don't  support  this
  2120.           option.
  2121.  
  2122.      tags, tag
  2123.           If your  version of elvis is  compiled with -DINTERNAL_TAGS,
  2124.           then this is a space-delimited list of tags files.  When you
  2125.           tell elvis to look up a tag, it searches though each file in
  2126.           turn until it finds the tag.
  2127.  
  2128.           If   your    version   of   elvis    is   compiled   without
  2129.           -DINTERNAL_TAGS, then you can achieve the same effect via an
  2130.           environment variable  called TAGPATH.  TAGPATH's  value is a
  2131.           colon-delimited list of  file or directory names.  (For some
  2132.           operating systems,  including MS-DOS, the  list is delimited
  2133.           by semicolons instead of colons.)
  2134.  
  2135.      tagstack
  2136.           This  option allows  you to disable  the tagstack.   I can't
  2137.           think of any reason why you would want to do that.
  2138.  
  2139.      term, te
  2140.           This read-only  option shows the  name of the  termcap entry
  2141.           that Elvis is using for your terminal.
  2142.  
  2143.      terse, tr
  2144.           The real  vi uses this  option to select  longer vs. shorter
  2145.           error messages.   Elvis has only one  set of error messages,
  2146.           though, so this option has no effect.
  2147.  
  2148.      timeout, to
  2149.           The  command   ":set  notimeout"  is   equivelent  to  ":set
  2150.           keytime=0",  and  ":set  timeout"  is  equivelent  to  ":set
  2151.           keytime=1".  This  affects the  behaviour of the  <Esc> key.
  2152.           See  the  discussion   of  the  "keytime"  option  for  more
  2153.           information.
  2154.  
  2155.      warn, wa
  2156.           If you have  modified a file but not yet  written it back to
  2157.           disk,  then  Elvis  will  normally  print a  warning  before
  2158.           executing a ":!cmd"  command.  However, in nowarn mode, this
  2159.           warning is not given.
  2160.  
  2161.           Elvis  also normally  prints  a message  after a  successful
  2162.           search that  wrapped at EOF.   The [no]warn option  can also
  2163.           disable this warning.
  2164.  
  2165.      window, wi
  2166.           This option controls how many lines are redrawn after a long
  2167.           move.
  2168.  
  2169.           On fast terminals, this is usually set to the number of rows
  2170.           that the  terminal can display, minus  one.  This causes the
  2171.           entire screen to be filled with text around the cursor.
  2172.  
  2173.  
  2174.  
  2175.  
  2176.                                    - 11 -
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.           On  slow terminals,  you may  wish to  reduce this  value to
  2186.           about 7  or so.   That way,  if you're doing  something like
  2187.           repeatedly hitting 'n' to search for each occurrence of some
  2188.           string and trying  to find a particular occurrence, then you
  2189.           don't need  to wait as  long for Elvis to  redraw the screen
  2190.           after each search.
  2191.  
  2192.      wrapmargin, wm
  2193.           Normally  (with wrapmargin=0)  Elvis  will let  you type  in
  2194.           extremely long lines, if you wish.
  2195.  
  2196.           However,  with  warpmargin set  to  something  other that  0
  2197.           (wrapmargin=10 is nice), Elvis will automatically cause long
  2198.           lines to  be "wrapped"  on a word  break for lines  come too
  2199.           close  to the  right-hand margin.   For  example: On  an 80-
  2200.           column screen,  ":set wm=10" will  cause lines to  wrap when
  2201.           their length exceeds 70 columns.
  2202.  
  2203.      wrapscan, ws
  2204.           Normally, when you  search for something, Elvis will find it
  2205.           no  matter where  it is  in the file.   Elvis starts  at the
  2206.           cursor position,  and searches  forward.  If Elvis  hits EOF
  2207.           without  finding  what you're  looking  for,  then it  wraps
  2208.           around to  continue searching from line 1.   If you turn off
  2209.           the  wrapscan option  (:se nows), then  when Elvis  hits EOF
  2210.           during a search, it will stop and say so.
  2211.  
  2212.      writeany, wr
  2213.           With  "writeany" turned  off,  elvis will  prevent you  from
  2214.           accidentally  overwriting  a file.   For  example, if  "foo"
  2215.           exists  then  ":w  foo"  will  fail.   If you  turn  on  the
  2216.           "writeany" option, then ":w foo" will work.
  2217.  
  2218.           Regardless of  the setting of "writeany",  though, ":w! foo"
  2219.           will work.   The '!'  forces the  ":w" command to  write the
  2220.           file unless the operating system won't allow it.
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.                                    - 12 -
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.      6.  CUT BUFFERS
  2251.  
  2252.           When  Elvis  deletes text,  it  stores that  text  in a  cut
  2253.      buffer.  This happens in both  visual mode and EX mode.  There is
  2254.      no practical limit to how much text a cut buffer can hold.
  2255.  
  2256.           There are 36 cut  buffers: 26 named buffers ("a through "z),
  2257.      9 anonymous buffers ("1 through "9), and 1 extra cut buffer (".).
  2258.  
  2259.           In EX mode, the :move and :copy commands use a cut buffer to
  2260.      temporarily hold the text to be moved/copied.
  2261.  
  2262.      6.1 Putting text into a Cut Buffer
  2263.  
  2264.           In visual  mode, text is  copied into a cut  buffer when you
  2265.      use  the d, y,  c, C,  s, or  x commands.  There  are also  a few
  2266.      others.
  2267.  
  2268.           By default, the text goes into the "1 buffer.  The text that
  2269.      used to be  in "1 gets shifted into "2,  "2 gets shifted into "3,
  2270.      and so  on.  The text that  used to be in "9  is lost.  This way,
  2271.      the last 9 things you deleted are still accessible.
  2272.  
  2273.           You can also put the text  into a named buffer -- "a through
  2274.      "z.   To  do  this,  you  should  type  the  buffer's  name  (two
  2275.      keystrokes:  a double-quote  and a  lowercase letter)  before the
  2276.      command that will cut the text.   When you do this, "1 through "9
  2277.      are not affected by the cut.
  2278.  
  2279.           You  can append  text to  one of the  named buffers.   To do
  2280.      this, type the buffer's  name in uppercase (a double-quote and an
  2281.      uppercase letter) before the d/y/c/C/s/x command.
  2282.  
  2283.           The  ".  buffer  is  special.   It  isn't  affected  by  the
  2284.      d/y/c/C/s/x command.  Instead,  it stores the text that you typed
  2285.      in the last time you were in input mode.  It is used to implement
  2286.      the . visual command, and ^A in input mode.
  2287.  
  2288.           In EX mode (also known as colon mode), the :delete, :change,
  2289.      and :yank  commands all  copy text into  a cut buffer.   Like the
  2290.      visual commands,  these EX commands  normally use the  "1 buffer,
  2291.      but you can use one of the named buffers by giving its name after
  2292.      the command.  For example,
  2293.  
  2294.           :20,30y a
  2295.  
  2296.  
  2297.      will copy lines 20 through 30 into cut buffer "a.
  2298.  
  2299.           You can't  directly put text  into the ". buffer,  or the "2
  2300.      through "9 buffers.
  2301.  
  2302.      6.2 Pasting from a Cut Buffer
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308.                                    - 1 -
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           There are  two styles  of pasting: line-mode  and character-
  2317.      mode.  If a cut buffer  contains whole lines (from a command like
  2318.      "dd")  then line-mode  pasting is  used;  if it  contains partial
  2319.      lines (from  a command like "dw")  then character-mode pasting is
  2320.      used.  The EX commands always cut whole lines.
  2321.  
  2322.           Character-mode pasting  causes the text to  be inserted into
  2323.      the line that the cursor is on.
  2324.  
  2325.           Line-mode pasting  inserts the text  on a new  line above or
  2326.      below  the line  that the  cursor is on.   It doesn't  affect the
  2327.      cursor's line at all.
  2328.  
  2329.           In visual mode, the p and  P commands insert text from a cut
  2330.      buffer.   Uppercase  P  will insert  it  before  the cursor,  and
  2331.      lowercase  p will  insert it after  the cursor.   Normally, these
  2332.      commands will  paste from the "1 buffer, but  you can specify any
  2333.      other buffer  to paste from.  Just type  its name (a double-quote
  2334.      and another character) before you type the P or p.
  2335.  
  2336.           In  EX mode,  the (pu)t  command pastes  text after  a given
  2337.      line.  To paste from a buffer other that "1, enter its name after
  2338.      the command.
  2339.  
  2340.      6.3 Macros
  2341.  
  2342.           The  contents of  a named  cut buffer can  be executed  as a
  2343.      series of ex/vi commands.
  2344.  
  2345.           To put the instructions  into the cut buffer, you must first
  2346.      insert them into the file, and  then delete them into a named cut
  2347.      buffer.
  2348.  
  2349.           To  execute a  cut  buffer's contents  as  EX commands,  you
  2350.      should give the  EX command "@" and the name  of the buffer.  For
  2351.      example, :@z will execute "z as a series of EX commands.
  2352.  
  2353.           To execute  a cut buffer's contents  as visual commands, you
  2354.      should give the visual command "@" and the letter of the buffer's
  2355.      name.   The  visual "@"  command  is different  from  the EX  "@"
  2356.      command.  They interpret the cut buffer's contents differently.
  2357.  
  2358.           The visual @  command can be rather finicky.  Each character
  2359.      in the  buffer is interpretted  as a keystroke.  If  you load the
  2360.      instructions into  the cut  buffer via  a "zdd command,  then the
  2361.      newline character  at the end  of the line will  be executed just
  2362.      like any  other character,  so the cursor  would be moved  down 1
  2363.      line.  If  you don't want the  cursor to move down  1 line at the
  2364.      end of  each @z command, then  you should load the  cut buffer by
  2365.      saying 0"zD instead.
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.                                    - 2 -
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.           Although cut buffers can  hold any amount of text, Elvis can
  2383.      only  execute small  buffers.   The size  limit  is roughly  1000
  2384.      characters, for  either EX macros  or VI macros.  If  a buffer is
  2385.      too large to execute, an error message is displayed.
  2386.  
  2387.           You can't nest :@  commands.  You can't run :@ commands from
  2388.      your .exrc  file, or any  other :source file  either.  Similarly,
  2389.      you  can't  run  a :source  command  from  within  an @  command.
  2390.      Hopefully, these restrictions will be lifted in a later version.
  2391.  
  2392.      6.4 The Effect of Switching Files
  2393.  
  2394.           When Elvis first starts up, all cut buffers are empty.  When
  2395.      you  switch  to a  different  file  (via the  :n  or :e  commands
  2396.      perhaps) the  9 anonymous cut buffers are  emptied again, but the
  2397.      other 27 buffers ("a through "z, and ".) retain their text.
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.                                    - 3 -
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.      7.  DIFFERENCES BETWEEN Elvis & BSD VI/EX
  2449.  
  2450.           Elvis is not 100% compatible with the real vi/ex.  Elvis has
  2451.      many small  extensions, some omissions, and  a few features which
  2452.      are implemented in a slightly different manner.
  2453.  
  2454.      7.1 Extensions
  2455.  
  2456.      Save Configuration
  2457.                The :mkexrc command  saves the current :set, :map, :ab,
  2458.                :color, and :digraph configurations in the ".exrc" file
  2459.                in your current directory.
  2460.  
  2461.      Previous File
  2462.                The  :N or  :prev command  moves backwards  through the
  2463.                args list.
  2464.  
  2465.      Center Current Row
  2466.                In  visual command mode,  the (lowercase)  "zz" command
  2467.                will center the current line on the screen, like "z=".
  2468.  
  2469.      Changing Repeat Count
  2470.                The  default  count value  for  . is  the  same as  the
  2471.                previous command which  . is meant to repeat.  However,
  2472.                you can  supply a new count if  you wish.  For example,
  2473.                after  "3dw", "."  will delete 3  words, but  "5." will
  2474.                delete 5 words.
  2475.  
  2476.      Previous Text
  2477.                The  text which  was most  recently  input (via  a "cw"
  2478.                command, or something similar) is saved in a cut buffer
  2479.                called ".  (which is a pretty hard name  to write in an
  2480.                English sentence).
  2481.  
  2482.      Keyword Lookup
  2483.                In visual command mode,  you can move the cursor onto a
  2484.                word and  press shift-K to  have Elvis run  a reference
  2485.                program to  look that word  up.  This command  alone is
  2486.                worth the  price of admission!   See the ctags  and ref
  2487.                programs.
  2488.  
  2489.      Increment/Decrement
  2490.                In visual command mode,  you can move the cursor onto a
  2491.                number and  then hit ## or #+  to increment that number
  2492.                by 1.  To increment it  by a larger amount, type in the
  2493.                increment  value  before hitting  the  initial #.   The
  2494.                number can also be  decremented or set by hitting #- or
  2495.                #=, respectively.
  2496.  
  2497.      Input ModeYou can backspace past the beginning of the line.
  2498.  
  2499.                The arrow keys work in input mode.
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.                                    - 1 -
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.                If  you type  control-A, then the  text that  you input
  2516.                last time is  inserted.  You will remain in input mode,
  2517.                so you  can backspace over  part of it, or  add more to
  2518.                it.  (This  is sort of  like control-@ on  the real vi,
  2519.                except that control-A really works.)
  2520.  
  2521.                Control-P will insert the contents of the cut buffer.
  2522.  
  2523.                Real  vi can  only  remember up  to  128 characters  of
  2524.                input, but Elvis can remember any amount.
  2525.  
  2526.                The ^T and  ^D keys can adjust the indent  of a line no
  2527.                matter where the cursor happens to be in that line.
  2528.  
  2529.                You  can save  your file and  exit Elvis  directly from
  2530.                input mode by hitting control-Z twice.
  2531.  
  2532.                Elvis  supports digraphs  as a  way to  enter non-ASCII
  2533.                characters.
  2534.  
  2535.      Start in Input Mode
  2536.                If you ":set  inputmode" in your .exrc file, then Elvis
  2537.                will start  up in input mode  instead of visual command
  2538.                mode.
  2539.  
  2540.      Visible Fonts
  2541.                With ":set  charattr", Elvis can  display "backslash-f"
  2542.                style character  attributes on the screen  as you edit.
  2543.                The following example shows the recognized atributes:
  2544.  
  2545.                     normal         \fBboldface\fR        \fIitalics\fR
  2546.                \fUunderlined\fR normal
  2547.  
  2548.                NOTE: you must  compile Elvis without the -DNO_CHARATTR
  2549.                flag for this to work.
  2550.  
  2551.      File Syncing
  2552.                After a crash, you can usually recover the altered form
  2553.                of the file from  the temporary file that Elvis uses --
  2554.                unless the temporary file was corrupted.
  2555.  
  2556.                UNIX  systems use  a delayed-write  cache,  which means
  2557.                that when  Elvis tries to write  to the temporary file,
  2558.                the information might still be in RAM instead of on the
  2559.                disk.  A power failure at that time would cause the in-
  2560.                RAM information  to be  lost.  UNIX's sync()  call will
  2561.                force all such information to disk.
  2562.  
  2563.                MS-DOS  and Atari  TOS don't write  a file's  length to
  2564.                disk  until  that file  is  closed.  Consequently,  the
  2565.                temporary file would appear to be 0 bytes long if power
  2566.                failed when we  were editing.  To avoid this problem, a
  2567.                sync() function  has been written which  will close the
  2568.                temporary file and then immediately reopen it.
  2569.  
  2570.  
  2571.  
  2572.                                    - 2 -
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.      Cursor Shape
  2582.                Elvis changes the shape of the cursor to indicate which
  2583.                mode  you're  in,  if  your  terminal's  termcap  entry
  2584.                includes the necessary capabilities.
  2585.  
  2586.      Hide nroff Lines
  2587.                The ":set hideformat" option hides nroff format control
  2588.                lines.   (They are  displayed  on the  screen as  blank
  2589.                lines.)
  2590.  
  2591.      Compiler Interface
  2592.                Elvis  is clever  enough  to parse  the error  messages
  2593.                emitted by  many compilers.   To use this  feature, you
  2594.                should  collect your compiler's  error messages  into a
  2595.                file  called  "errlist";  Elvis  will read  this  file,
  2596.                determine which source  file caused the error messages,
  2597.                start editing  that file, move  the cursor to  the line
  2598.                where  the error  was detected,  and display  the error
  2599.                message on the status line.  Nifty!
  2600.  
  2601.      Visible Text Selection
  2602.                In  visual command mode,  'v' starts  visibly selecting
  2603.                characters  and  'V'  starts  visibly  selecting  whole
  2604.                lines.   The  character or  line  where  the cursor  is
  2605.                located becomes one endpoint of the selection.  You can
  2606.                then use the  standard cursor movement commands to move
  2607.                the cursor to the other endpoint, and then press one of
  2608.                the operator  commands (c/d/y/</>/!/=/\).  The operator
  2609.                will then immediately be applied to the selected text.
  2610.  
  2611.      Pop-up Menu Operator
  2612.                The '\' key is  a new operator, similar in operation to
  2613.                the c/d/y/</>/! operators.  It conjures up a menu, from
  2614.                which you can select  any of the other operators plus a
  2615.                few other common commands.
  2616.  
  2617.      Preset Filter Operator
  2618.                The '=' key is  another new operator.  It is similar to
  2619.                the  '!' operator,  except that while  '!' asks  you to
  2620.                type  in a  filter command  each  time, '='  assumes it
  2621.                should always  run the  command stored in  the equalprg
  2622.                option.
  2623.  
  2624.      Move to a Given Percentage
  2625.                The '%' movement  key can now accept an optional count.
  2626.                Without a count, the  '%' key still moves to a matching
  2627.                parenthesis like it always did.  With a count somewhere
  2628.                between  1 and  100,  though, it  moves  the cursor  to
  2629.                approximately a given percentage of the way through the
  2630.                file.  For  example, typing "50%" will  move the cursor
  2631.                to the middle of the file.
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.                                    - 3 -
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.      Regular Expressions
  2648.                In  regular expressions, several  new forms  of closure
  2649.                operators are supported: \{n}, \{n,m}, \+, and \?.
  2650.  
  2651.      7.2 Omissions
  2652.  
  2653.           The replace  mode is a hack.  It doesn't  save the text that
  2654.      it overwrites.
  2655.  
  2656.           Long lines  are displayed differently  -- where the  real vi
  2657.      would wrap  a long  line onto several  rows of the  screen, Elvis
  2658.      simply displays  part of the  line, and allows you  to scroll the
  2659.      screen sideways to see the rest of it.
  2660.  
  2661.           The ":preserve" and  ":recover" commands are missing.  So is
  2662.      the -r  flag.  I've never  had a good reason  to use ":preserve",
  2663.      and since ":recover" is used  so rarely I decided to implement it
  2664.      as a separate program.  There's no need to load the recovery code
  2665.      into memory every time you edit a file, I figured.
  2666.  
  2667.           LISP support  is missing.   However, the  = key is  still an
  2668.      operator that reformats  lines of text.  By default, it reformats
  2669.      lines by sending them through the fmt filter, but you could write
  2670.      your  own LISP  beautifier and  configure elvis  to use  it.  Key
  2671.      mappings could take  care of most other differences.  Auto-indent
  2672.      is the only thing that is irrecoverably lost.
  2673.  
  2674.           Autoindent mode  acts a little  different from the  real vi,
  2675.      anyway.  It  doesn't handle ^^D  or 0^D correctly.   On the other
  2676.      hand, it does allow ^D and ^T to be used anywhere in the line, to
  2677.      adjust the indentation for the whole line.
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.                                    - 4 -
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.      8.  INTERNAL
  2713.  
  2714.           You don't  need to know the material in  this section to use
  2715.      Elvis.  You only need it if you intend to modify Elvis.
  2716.  
  2717.           You should  also check out the  CFLAGS, TERMCAP, ENVIRONMENT
  2718.      VARIABLES, VERSIONS,  and QUIESTIONS  & ANSWERS sections  of this
  2719.      manual.
  2720.  
  2721.      8.1 The temporary file
  2722.  
  2723.           The  temporary file  is divided  into  blocks of  1024 bytes
  2724.      each.  The functions in "blk.c" maintain a cache of the five most
  2725.      recently used blocks, to minimize file I/O.
  2726.  
  2727.           When Elvis starts up,  the file is copied into the temporary
  2728.      file  by the  function tmpstart() in  "tmp.c".  Small  amounts of
  2729.      extra space  are inserted into the temporary  file to insure that
  2730.      no text lines  cross block boundaries.  This speeds up processing
  2731.      and  simplifies storage  management.  The  extra space  is filled
  2732.      with NUL  characters.  the input file must  not contain any NULs,
  2733.      to avoid  confusion.  This also limits lines to  a length of 1023
  2734.      characters or less.
  2735.  
  2736.           The data blocks  aren't necessarily stored in sequence.  For
  2737.      example, it  is entirely possible that  the data block containing
  2738.      the first lines of text will be stored after the block containing
  2739.      the last lines of text.
  2740.  
  2741.           In RAM,  Elvis maintains two  lists: one that  describes the
  2742.      "proper" order  of the disk blocks, and  another that records the
  2743.      line number of the last line  in each block.  When Elvis needs to
  2744.      fetch a  given line of text,  it uses these tables  to locate the
  2745.      data block which contains that line.
  2746.  
  2747.           Before  each change  is made  to the  file, these  lists are
  2748.      copied.  The copies can be  used to "undo" the change.  Also, the
  2749.      first list -- the one that  lists the data blocks in their proper
  2750.      order --  is written to  the first data  block of the  temp file.
  2751.      This list can be used during file recovery.
  2752.  
  2753.           When blocks  are altered, they are  rewritten to a different
  2754.      block in  the file,  and the  order list is  updated accordingly.
  2755.      The  original  block  is  left  intact,  so that  "undo"  can  be
  2756.      performed  easily.  Elvis  will eventually  reclaim  the original
  2757.      block, when it is no longer needed.
  2758.  
  2759.      8.2 Implementation of Editing
  2760.  
  2761.           There are three basic operations which affect text:
  2762.           -> delete text - delete(from, to)
  2763.           -> add text    - add(at, text)
  2764.           -> yank text   - cut(from, to)
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.                                    - 1 -
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.           To yank text, all  text between two text positions is copied
  2779.      into a  cut buffer.  The  original text is not  changed.  To copy
  2780.      the text into a cut buffer, you need only remember which physical
  2781.      blocks that contain the cut text, the offset into the first block
  2782.      of the  start of the cut,  the offset into the  last block of the
  2783.      end of the cut, and what kind of cut it was.  (Cuts may be either
  2784.      character cuts or line cuts; the kind of a cut affects the way it
  2785.      is later  "put".) Yanking is  implemented in the  function cut(),
  2786.      and  pasting  is  implemented  in  the function  paste().   These
  2787.      functions are defined in "cut.c".
  2788.  
  2789.           To delete  text, you must modify the  first and last blocks,
  2790.      and  remove  any  reference  to  the  intervening blocks  in  the
  2791.      header's list.  The text to be deleted is specified by two marks.
  2792.      This is implemented in the function delete().
  2793.  
  2794.           To add text, you must specify  the text to insert (as a NUL-
  2795.      terminated string)  and the place to insert it  (as a mark).  The
  2796.      block into which the text is  to be inserted may need to be split
  2797.      into as  many as four blocks, with  new intervening blocks needed
  2798.      as well...  or it could be as simple as modifying a single block.
  2799.      This is implemented in the function add().
  2800.  
  2801.           There  is also  a  change() function,  which generally  just
  2802.      calls delete()  and add().  For  the special case  where a single
  2803.      character is being  replaced by another single character, though,
  2804.      change() will optimize things somewhat.  The add(), delete(), and
  2805.      change() functions are all defined in "modify.c".
  2806.  
  2807.           The input()  function reads text from a  user and inserts it
  2808.      into the  file.  It makes  heavy use of the  add(), delete(), and
  2809.      change() functions.  It inserts characters one at a time, as they
  2810.      are typed.
  2811.  
  2812.           When  text is modified,  an internal  file-revision counter,
  2813.      called changes,  is incremented.  This counter  is used to detect
  2814.      when certain  caches are out of date.   (The "changes" counter is
  2815.      also incremented when we switch  to a different file, and also in
  2816.      one  or two  similar situations  --  all related  to invalidating
  2817.      caches.)
  2818.  
  2819.      8.3 Marks and the Cursor
  2820.  
  2821.           Marks  are places  within  the text.   They are  represented
  2822.      internally as 32-bit values which are split into two bitfields: a
  2823.      line number  and a character  index.  Line numbers  start with 1,
  2824.      and  character indexes  start with  0.  Lines can  be up  to 1023
  2825.      characters long,  so the character index is 10  bits wide and the
  2826.      line number fills the remaining 22 bits in the long int.
  2827.  
  2828.           Since  line numbers  start with  1, it  is impossible  for a
  2829.      valid  mark to  have a  value  of 0L.   0L is  therefore used  to
  2830.      represent unset marks.
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.                                    - 2 -
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.           When you  do the "delete  text" change, any  marks that were
  2845.      part of the  deleted text are unset, and any  marks that were set
  2846.      to points  after it are  adjusted.  Marks are  adjusted similarly
  2847.      after new text is inserted.
  2848.  
  2849.           The cursor is represented as a mark.
  2850.  
  2851.      8.4 Colon Command Interpretation
  2852.  
  2853.           Colon commands are parsed, and the command name is looked up
  2854.      in an  array of  structures which also  contain a pointer  to the
  2855.      function that  implements the command,  and a description  of the
  2856.      arguments  that  the   command  can  take.   If  the  command  is
  2857.      recognized  and its  arguments are  legal,  then the  function is
  2858.      called.
  2859.  
  2860.           Each function  performs its task; this  may cause the cursor
  2861.      to be moved to a different line, or whatever.
  2862.  
  2863.      8.5 Screen Control
  2864.  
  2865.           In input mode or  visual command mode, the screen is redrawn
  2866.      by a  function called redraw().   This function is  called in the
  2867.      getkey() function before each keystroke is read in, if necessary.
  2868.  
  2869.           Redraw() writes to the screen via a package which looks like
  2870.      the "curses"  library, but isn't.   It is actually  much simpler.
  2871.      Most  curses  operations are  implemented  as  macros which  copy
  2872.      characters into a large I/O  buffer, which is then written with a
  2873.      single large write() call as part of the refresh() operation.
  2874.  
  2875.           (Note: Under  MS-DOS, the pseudo-curses macros  check to see
  2876.      whether you're using the  pcbios interface.  If you are, then the
  2877.      macros call functions in "pc.c" to implement screen updates.)
  2878.  
  2879.           The  low-level functions  which modify  text  (namely add(),
  2880.      delete(),  and  change())  supply  redraw()  with clues  to  help
  2881.      redraw() decide  which parts of the screen  must be redrawn.  The
  2882.      clues are given via a function called redrawrange().
  2883.  
  2884.           Most EX  commands use  the pseudo-curses package  to perform
  2885.      their output, like redraw().
  2886.  
  2887.           There is  also a function  called msg() which  uses the same
  2888.      syntax  as printf().   In EX  mode, msg()  writes message  to the
  2889.      screen  and automatically  adds  a newline.   In  VI mode,  msg()
  2890.      writes  the message  on the  bottom line of  the screen  with the
  2891.      "standout" character attribute turned on.
  2892.  
  2893.      8.6 Options
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.  
  2901.  
  2902.                                    - 3 -
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.           For each option  available through the ":set" command, Elvis
  2911.      contains  a  character  array  variable, named  "o_option".   For
  2912.      example, the "lines" option uses a variable called "o_lines".
  2913.  
  2914.           For boolean  options, the array  has a dimension  of 1.  The
  2915.      first  (and only)  character  of the  array  will be  NUL if  the
  2916.      variable's value  is FALSE, and  some other value if  it is TRUE.
  2917.      To check the value, just by dereference the array name, as in "if
  2918.      (*o_autoindent)".
  2919.  
  2920.           For number  options, the  array has  a dimension of  3.  The
  2921.      array is treated  as three unsigned one-byte integers.  The first
  2922.      byte is  the current value  of the option.  The  second and third
  2923.      bytes are the lower and upper bounds of that option.
  2924.  
  2925.           For  string options,  the array usually  has a  dimension of
  2926.      about 60  but this may vary.   The option's value is  stored as a
  2927.      normal NUL-terminated string.
  2928.  
  2929.           All  of the  options  are declared  in  "opts.c".  Most  are
  2930.      initialized to  their default values; the  initopts() function is
  2931.      used to perform any environment-specific initialization.
  2932.  
  2933.      8.7 Portability
  2934.  
  2935.           To  improve  portability,  Elvis  collects  as many  of  the
  2936.      system-dependent  definitions  as  possible into  the  "config.h"
  2937.      file.  This file begins with some preprocessor instructions which
  2938.      attempt  to determine  which  compiler and  operating system  you
  2939.      have.   After  that, it  conditionally  defines  some macros  and
  2940.      constants for your system.
  2941.  
  2942.           One of the more significant macros is ttyread().  This macro
  2943.      is used  to read raw characters from  the keyboard, possibly with
  2944.      timeout.   For  UNIX systems,  this  basically  reads bytes  from
  2945.      stdin.  For MSDOS, TOS,  and OS9, ttyread() is a function defined
  2946.      in curses.c.  There is also a ttywrite() macro.
  2947.  
  2948.           The tread()  and twrite() macros are  versions of read() and
  2949.      write() that are used for text files.  On UNIX systems, these are
  2950.      equivelent  to read()  and write().   On  MS-DOS, these  are also
  2951.      equivelent  to  read()  and  write(),  since  DOS  libraries  are
  2952.      generally   clever   enough   to   convert   newline   characters
  2953.      automatically.   For Atari  TOS, though, the  MWC library  is too
  2954.      stupid to do this, so we had to do the conversion explicitly.
  2955.  
  2956.           Other macros may substitute index() for strchr(), or bcopy()
  2957.      for memcpy(), or map the "void" data type to "int", or whatever.
  2958.  
  2959.           The  file  "tinytcap.c" contains  a  set  of functions  that
  2960.      emulate the  termcap library for  a small set  of terminal types.
  2961.      The terminal-specific  info is hard-coded into  this file.  It is
  2962.      only used  for systems that don't  support real termcap.  Another
  2963.      alternative for screen control  can be seen in the "curses.h" and
  2964.      "pc.c" files.  Here, macros named VOIDBIOS and CHECKBIOS are used
  2965.  
  2966.  
  2967.  
  2968.                                    - 4 -
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.      to  indirectly  call  functions  which perform  low-level  screen
  2977.      manipulation via BIOS calls.
  2978.  
  2979.           The stat() function must  be able to come up with UNIX-style
  2980.      major/minor/inode  numbers  that  uniquely  identify  a  file  or
  2981.      directory.
  2982.  
  2983.           Please try  to keep you changes localized,  and wrap them in
  2984.      #if/#endif pairs,  so that Elvis  can still be  compiled on other
  2985.      systems.  And  PLEASE let me know about it,  so I can incorporate
  2986.      your changes into my latest-and-greatest version of Elvis.
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.                                    - 5 -
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.      9.  MAKEFILE
  3043.  
  3044.           On  most Operating  Systems,  and with  most compilers,  the
  3045.      "Makefile.mix"   file  is   used  to   control   compilation  and
  3046.      installation of Elvis.   This section of the manual describes the
  3047.      overall   structure   of    "Makefile.mix",   and   the   various
  3048.      configuration options in it.
  3049.  
  3050.      9.1 Configuring the Makefile
  3051.  
  3052.           Begin by copying  "Makefile.mix" to "Makefile".  Never alter
  3053.      the original "Makefile.mix".
  3054.  
  3055.           Most of the configuration options are controlled via a group
  3056.      of macros.  Makefile.mix  begins with several pre-configured sets
  3057.      of  macro definitions  - one  group for each  of the  most common
  3058.      supported systems.   As shipped,  all of these  macro definitions
  3059.      are  commented out;  you  must either  uncomment out  one of  the
  3060.      groups, or  (for less common  systems) construct an  entirely new
  3061.      group.
  3062.  
  3063.      9.2 Using the Makefile
  3064.  
  3065.           After  configuring  the  Makefile,  you  can run  "make"  to
  3066.      compile the  programs.  There are  also some other  useful things
  3067.      that the Makefile can do...
  3068.                COMMAND     RESULT
  3069.                make        compile all programs
  3070.                make installcopy the programs to the BIN directory
  3071.                make clean  remove all object files
  3072.                make clobberremove everything except source & documentation
  3073.                make uue    produce uuencoded compressed tar archives of the source
  3074.                make sh     produce shar archives of the source
  3075.  
  3076.           Note that the last two will probably work only under UNIX.
  3077.  
  3078.      9.3 What "make install" does
  3079.  
  3080.           To install elvis, we should copy all of the executables into
  3081.      a  directory where  users can find  them; copy  the documentation
  3082.      into a directory where  the on-line manual program can find them;
  3083.      and  arrange for  edit  buffers to  be preserved  after a  system
  3084.      crash.    The   "make  install"   command   tries   to  do   this
  3085.      automatically, but there are problems.
  3086.  
  3087.           Practically  all  operating  systems  allow programs  to  be
  3088.      installed  different   directories.   As   shipped,  Makefile.mix
  3089.      contains somebody's best guess as to where you'd like them to go.
  3090.      You should double check it, though.  The BIN macro controls where
  3091.      the programs will be installed.
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.                                    - 1 -
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.           On UNIX systems  the "elvprsv" and "elvrec" programs need to
  3109.      be installed  as SUID-root programs.  Consequently,  you must run
  3110.      "make install" as root; then they will automatically be installed
  3111.      as SUID-root.
  3112.  
  3113.           For text to be recovered  after a crash, you need to arrange
  3114.      for  the "elvprsv"  program to  be  run before  the /tmp  file is
  3115.      cleaned.  This means that the /etc/rc file (or whatever) needs to
  3116.      be  edited.   If  you  have  a  SysV UNIX  system  which  uses  a
  3117.      /etc/rc2.d directory  for storing start-up  commands, then you're
  3118.      lucky.   "make install"  will detect  that /etc/rc2.d  exists and
  3119.      attempt    to     automatically    create    a     file    called
  3120.      "/etc/rc2.d/S03elvis" which runs  elvprsv.  However, for non-UNIX
  3121.      systems, or UNIX systems which don't have a /etc/rc2.d directory,
  3122.      you'll need  to do this  by hand.  See the  "Versions" section of
  3123.      the manual for hints about doing this on your particular system.
  3124.  
  3125.           Non-UNIX  systems don't  have a  standard place  where UNIX-
  3126.      style man-pages go,  so "make install" doesn't attempt to install
  3127.      documentation on those systems.
  3128.  
  3129.           On UNIX systems, there  is no standard place either, but you
  3130.      can  be pretty  sure  that your  system has  a non-standard  one.
  3131.      There  is a  shell script called  "instman.sh" which  attempts to
  3132.      figure out  where the man-pages  belong on your  system, and then
  3133.      copies them  there.  You might need to  edit "instman.sh" to make
  3134.      it work,  but try it as-is  first.  "instman.sh" is automatically
  3135.      run by "make install".
  3136.  
  3137.           Note: It is safe to run "make install" more than once.
  3138.  
  3139.      9.4 Summary of Macros
  3140.  
  3141.           The following describes the configuration macros.  With most
  3142.      versions of make, a blank macro can simply be left undefined.
  3143.  
  3144.      OBJ  This is  the filename extension for  unlinked object files -
  3145.           usually .o, but MS-DOS uses .obj.
  3146.  
  3147.      EXE  This is  the filename extension for  elvis executable file -
  3148.           usually nothing,  but MS-DOS uses .exe,  and other operating
  3149.           systems may use something else.
  3150.  
  3151.      COM  This is the filename extension for the executables of elvis'
  3152.           support programs  - usually the  same as the  EXE macro, but
  3153.           since the support  programs are all much smaller that elvis,
  3154.           MS-DOS can use the .com format.
  3155.  
  3156.      EXTRAThis  is a space-delimited  list of  version-specific object
  3157.           files to  be linked into  elvis.  Typically, this  list will
  3158.           contain  at   least  one  object  file   which  was  written
  3159.           specifically  for a  given  operating system.   It may  also
  3160.           contain "tinytcap$(OBJ)" or "tinyprnt$(OBJ)".
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.                                    - 2 -
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.      EXTRA2
  3176.           This  is a space-delimited  list of  version-specific object
  3177.           files used in elvis and  a few of the support programs.  For
  3178.           UNIX-like  systems, this  is typically  an empty  list.  For
  3179.           non-UNIX  systems, it  will usually either  be empty,  or it
  3180.           will  contain the  name  of an  object  file which  contains
  3181.           functions which emulate certain UNIX system calls.  (Not all
  3182.           non-UNIX  systems  need  any  special  emulation  functions,
  3183.           because all C libraries  try to emulate UNIX.  You only need
  3184.           an  EXTRA2 list  if the  library  doesn't emulate  UNIX well
  3185.           enough.)
  3186.  
  3187.      LIBS This is  a list of  library flags used  while linking elvis.
  3188.           UNIX systems  need "-ltermcap" or  something similar, unless
  3189.           the  EXTRA  macro  includes  "tinytcap$(OBJ)".   Most  other
  3190.           operating  systems  use   "tinytcap$(OBJ)"  and  don't  need
  3191.           anything else, so they leave the LIBS list empty.
  3192.  
  3193.      BIN  This is the  directory where executables should be installed
  3194.           by "make install".
  3195.  
  3196.      CC   This is the C compiler command, possibly with "memory model"
  3197.           flags.
  3198.  
  3199.      CFLAGS
  3200.           This lists  the compiler  flags used to  select compile-time
  3201.           options.  The "CFLAGS" section of this manual describes this
  3202.           in detail.
  3203.  
  3204.      LNK  This is the name of the linker.  If you want to use $(CC) as
  3205.           your linker, then you can leave LNK undefined.
  3206.  
  3207.      LFLAGS
  3208.           This  is a  list of  linker flags  used to  select link-time
  3209.           options.  It is almost always blank.
  3210.  
  3211.      SMALLThe  flag  for  special  small  memory model  compilation  -
  3212.           usually blank.
  3213.  
  3214.      OF   The link  flag to control  the output file's  name - usually
  3215.           -o<space>.  The  Sun version  of "make" strips  off trailing
  3216.           whitespace, so  a pair of empty quotes  has been added after
  3217.           the  space,   to  protect  it.   On   non-Suns,  this  isn't
  3218.           necessary.
  3219.  
  3220.      RF   The flag  used to denote "compile but  don't link" - usually
  3221.           -c
  3222.  
  3223.      PROGSThis is  a space-delimited list of  all programs.  This list
  3224.           always  includes  elvis, ctags,  ref,  elvrec, and  elvprsv.
  3225.           Also, everybody gets fmt except for BSD UNIX; it already has
  3226.           its own version of fmt as standard equipment.
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.                                    - 3 -
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.           Most  non-UNIX systems  also include  the  vi, ex,  and view
  3242.           aliases.  (UNIX doesn't need those aliases in the PROGS list
  3243.           because it creates them via file links during installation.)
  3244.           OS-9 doesn't include  the ex alias, because there is already
  3245.           a command by that name built into its standard shell.
  3246.  
  3247.           Note: some  MS-DOS configurations  break this list  into two
  3248.           smaller  lists, to  compensate for  MS-DOS's  limitations on
  3249.           command line length.
  3250.  
  3251.      CHMEMThis is  either blank,  or a  command to be  run immediately
  3252.           after linking elvis.   Under Minix and Coherent, elvis needs
  3253.           to have  extra space assigned for the stack  & heap after it
  3254.           has been  linked, so  their commands  to do that  are placed
  3255.           here.  Most  other operating systems  generally either don't
  3256.           need  to have  their  stacks enlarged,  or  they enlarge  it
  3257.           during linking.
  3258.  
  3259.      SORT This should  be defined to  be -DSORT if you  want your tags
  3260.           list to  be sorted, or  blank if you want  it unsorted.  The
  3261.           real  vi requires  a sorted  tags file, so  for the  sake of
  3262.           compatibility  all of  the UNIX  configurations  use -DSORT.
  3263.           Elvis doesn't  need a sorted  tags file, though,  so on non-
  3264.           UNIX systems you can leave this macro blank.
  3265.  
  3266.      RM   This  is   the  name  of   a  program  that   deletes  files
  3267.           unconditionally.   It is  used during  "make clean".   RM is
  3268.           defined  as "rm  -f"  for UNIX  systems, or  "del" for  most
  3269.           others.
  3270.  
  3271.      CP   This is the name of  a program that copies files.  - usually
  3272.           "cp" or "copy".  It is used during "make install".
  3273.  
  3274.      SYS  This  is  the type  of  system.   It is  used  to select  an
  3275.           appropriate style of  linking and installation that are used
  3276.           by "make"  and "make install",  respectively.  The available
  3277.           types are:
  3278.                          unx       UNIX and UNIX-like systems
  3279.                          dos       MS-DOS
  3280.                          ami       AmigaDos
  3281.                          tos       Atari TOS
  3282.                          os9       OS-9/68k
  3283.                          vms       VAX/VMS
  3284.                          xdos      cross-compiled on SCO for MS-DOS
  3285.  
  3286.      DUMMYThis is used as the "source" filename in the dependency list
  3287.           of  targets   which  are  supposed   to  be  unconditionally
  3288.           compiled.   It is  usually  nothing since  most versions  of
  3289.           "make" treat  an empty source  file list as  a special case,
  3290.           but OS-9  needs it defined  as "dummy" and  further requires
  3291.           that there be no actual file named dummy.
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.                                    - 4 -
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.      CFG  The is the name of the compiler configuration file - usually
  3308.           blank, since most compilers don't need a configuration file.
  3309.           Some MS-DOS compilers need it, though.
  3310.  
  3311.      9.5 Structure of Makefile.mix
  3312.  
  3313.           Makefile.mix  begins  with  several  sets of  commented  out
  3314.      configuration macro  definitions, as described  above.  A comment
  3315.      saying "The  rest of  this Makefile contains  no user-serviceable
  3316.      parts" marks the end of  this section.  Most people won't need to
  3317.      edit anything after that.
  3318.  
  3319.           This is  followed by macro definitions  which are identical,
  3320.      regardless of  your operating system.   The OBJS macros  list the
  3321.      object files that form the  portable parts of elvis, and are used
  3322.      together with  the EXTRA  and EXTRA2 configuration  macros during
  3323.      linking.
  3324.  
  3325.           The  SRC  macros list  all  of the  files  mentioned in  the
  3326.      "MANIFEST" file.   These are used  to bundle the  source code via
  3327.      "make uue" or "make sh".
  3328.  
  3329.           This is  followed by a  target named "all"  which depends on
  3330.      all  of the  programs listed  in  the PROGS  configuration macro.
  3331.      This  is followed  by detailed  instructions describing  how each
  3332.      file is compiled and linked.  The only exceptions are the "elvis"
  3333.      program, and the various forms of the "alias" program.
  3334.  
  3335.           Linking  a big  program like elvis  is non-standard  on some
  3336.      systems.   To support  this, we  just say  that elvis  depends on
  3337.      "linkelv.$(SYS)",  where  "$(SYS)" is  replaced  by whatever  you
  3338.      defined  the SYS  configuration macro  to  be.  The  various link
  3339.      styles are listed after that.   The only really tricky one is for
  3340.      DOS.  Since the list of files  to be linked is too long to fit on
  3341.      a DOS  command line, a  customized response file  is created, and
  3342.      the  name of  the  response file  is passed  instead.  The  exact
  3343.      format of the response file depends on the compiler you're using.
  3344.  
  3345.           This  is followed  by system-dependent  ways of  linking the
  3346.      "alias"  object file  to create  multiple executables.   For most
  3347.      systems, we only really link it once to form the "ex" executable,
  3348.      and  then copy  that  executable to  form the  "vi", "view",  and
  3349.      "input"  executables.    OS-9,  though,  doesn't   need  an  "ex"
  3350.      executable and it requires actual linking for each alias.
  3351.  
  3352.           Next comes installation,  in all its system dependent forms.
  3353.      This  uses the  now-familiar trick of  saying that  the "install"
  3354.      target  depends on  a  bogus file  named  "inst.$(SYS)" and  then
  3355.      listing each installation  technique after that.  There should be
  3356.      no surprises here.
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.                                    - 5 -
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.           The  rest  of  Makefile.mix  contains  a few  handy  pseudo-
  3373.      targets, such as "make clean".
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.                                    - 6 -
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.      10.  CFLAGS
  3439.  
  3440.           Elvis uses many preprocessor symbols to control compilation.
  3441.      Some  of these  control the  sizes of buffers  and such.   The "-
  3442.      DNO_XXXX" options remove small sets of related features.
  3443.  
  3444.           Most  Elvis users  will probably want  to keep  all features
  3445.      available.  Minix-PC  users, though, will have  to sacrifice some
  3446.      sets because otherwise Elvis  would be too bulky to compile.  The
  3447.      "asld" phase of the compiler craps out.
  3448.  
  3449.      -DM_SYSV, -Dbsd, -DTOS, -DCOHERENT, -Damiga
  3450.           These flags  tell the compiler that  Elvis is being compiled
  3451.           for  System-V  UNIX,  BSD  UNIX,  Atari  TOS,  Coherent,  or
  3452.           AmigaDos,  respectively.  For  other  systems, the  config.h
  3453.           file can generally figure it out automatically.
  3454.  
  3455.      -DRAINBOW
  3456.           For MS-DOS systems,  this causes support for the DEC Rainbow
  3457.           to be compiled into Elvis.
  3458.  
  3459.      -DNO_S5WINSIZE
  3460.           Some  versions  of  SysV  UNIX  don't  support  support  the
  3461.           "winsize" style of  screen-size testing.  If you have a SysV
  3462.           system  and  can't   compile  "curses.c",  then  try  adding
  3463.           -DNO_S5WINSIZE to the CFLAGS.
  3464.  
  3465.      -DTERMIOS
  3466.           POSIX is a  SysV-derived specification which uses a terminal
  3467.           control package called "termios", instead of "termio".  Some
  3468.           other SysV systems may also use termios.  You can make elvis
  3469.           uses  termios instead  of the more  common termio  by adding
  3470.           -DTERMIOS to  CFLAGS.  (Note:  This hasn't been  tested very
  3471.           well.)
  3472.  
  3473.      -DNBUFS=number
  3474.           Elvis keeps  most of your  text in a temporary  file; only a
  3475.           small amount  is actually stored  in RAM.  This  flag allows
  3476.           you to  control how much  of the file  can be in  RAM at any
  3477.           time.  The default is 5 blocks, and the minimum is 3 blocks.
  3478.           (See the -DBLKSIZE flag, below.)
  3479.  
  3480.           More RAM  allows global changes  to happen a  little faster.
  3481.           If you're just making many small changes in one section of a
  3482.           file, though, extra RAM won't help much.
  3483.  
  3484.      -DBLKSIZE=number
  3485.           This controls the size of blocks that Elvis uses internally.
  3486.           The value of BLKSIZE must be a power of two.  Every time you
  3487.           double BLKSIZE,  you quadruple the size of  a text file that
  3488.           Elvis can  handle, but you also cause  the temporary file to
  3489.           grow  faster.   For  MS-DOS,  Coherent,  and  Minix-PC,  the
  3490.           default value is 1024, which  allows you to edit files up to
  3491.           almost 512K bytes  long.  For all other systems, the default
  3492.           value  is 2048,  which  allows you  to edit  files that  are
  3493.  
  3494.  
  3495.  
  3496.                                    - 1 -
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.           nearly 2 megabytes long.
  3505.  
  3506.           The BLKSIZE  also determines the maximum  line length, and a
  3507.           few other limits.   BLKSIZE should be either 256, 512, 1024,
  3508.           or  2048.   Values  other than  these  can  lead to  strange
  3509.           behaviour.
  3510.  
  3511.      -DTMPDIR=string
  3512.           This sets the default value of the "directory" option, which
  3513.           specifies  where  the temporary  files  should reside.   The
  3514.           value  of TMPDIR  must be  a string, so  be sure  your value
  3515.           includes the quote characters on each end.
  3516.  
  3517.      -DEXRC=str, -DHMEXRC=str, -DSYSEXRC=str, -DEXINIT=str
  3518.           This lets you control the names of the initialization files.
  3519.           Their values must be strings, so be careful about quoting.
  3520.  
  3521.           EXRC is  the name of the initialization  file in the current
  3522.           directory.  Its default  value is ".exrc" on UNIX systems --
  3523.           the  same as  the real  vi.   Since that  isn't a  legal DOS
  3524.           filename, under  DOS the  default is "elvis.rc".   For other
  3525.           systems, check the config.h file.
  3526.  
  3527.           HMEXRC is  the name of the initialization  file in your home
  3528.           directory.  By default, it  is the same as EXRC.  Elvis will
  3529.           automatically  prepend the  name of  your home  directory to
  3530.           HMEXRC at run time, so don't give a full path name.
  3531.  
  3532.           SYSEXRC is  the name  of a system-wide  initialization file.
  3533.           It has no default value; if you don't define a value for it,
  3534.           then  the code  that supports  SYSEXRC just  isn't compiled.
  3535.           The value of SYSEXRC should be a full pathname, in quotes.
  3536.  
  3537.           EXINIT  is the  name  of an  environment  variable that  can
  3538.           contain  initialization commands.   Normally,  its value  is
  3539.           "EXINIT".
  3540.  
  3541.      -DKEYWORDPRG=string
  3542.           This flag  determines the default value  of the "keywordprg"
  3543.           option.  Its  value must  be a  string, so be  careful about
  3544.           quoting.  The default value  of this flag is "ref", which is
  3545.           a C reference program.
  3546.  
  3547.      -DCC_COMMAND=string -DMAKE_COMMAND=string -DERRLIST=string
  3548.           These  control  the  names of  the  C  compiler, the  "make"
  3549.           utility, and the  error output file, respectively.  They are
  3550.           only used if -DNO_ERRLIST is not given.
  3551.  
  3552.           The  default value  of CC_COMMAND  depends on  the Operating
  3553.           System and compiler that you use to compile elvis; for UNIX,
  3554.           the default is "cc".  The default values of MAKE_COMMAND and
  3555.           ERRLIST are "make" and "errlist", respectively.
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.                                    - 2 -
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.      -DMAXRCLEN=number
  3572.           This  determines  how  large  a  :@  macro  command  can  be
  3573.           (measured  in bytes).   The default is  1000 bytes.   If you
  3574.           increase  this value  significantly,  then you  may need  to
  3575.           allocate  extra  memory  for  the  stack.  See  the  "CHMEM"
  3576.           setting in the Makefile.
  3577.  
  3578.      -DSHELL=string
  3579.           This is  the default value of the  "shell" option, and hence
  3580.           the  default  shell  used  from  within  Elvis.   This  only
  3581.           controls  the  default;  the  value  you  give here  may  be
  3582.           overridden  at run-time by  setting an  environment variable
  3583.           named SHELL  (or COMSPEC for  MS-DOS).  Its value  must be a
  3584.           string constant, so be careful about quoting.
  3585.  
  3586.      -DMAILER=string
  3587.           This is the name of the program that Elvis uses to send mail
  3588.           to  a user  whose text  has just  been preserved.   (See the
  3589.           manual page for the elvprsv program.) If your system doesn't
  3590.           use electronic  mail, then  this option is  irrelevent.  For
  3591.           UNIX and OS-9 systems,  though, the value should be a quoted
  3592.           string.   The default  value is "mail",  but SysV  users may
  3593.           prefer to use "mailx", and BSD users may prefer "Mail".
  3594.  
  3595.      -DTAGS=string
  3596.           This sets the name of the  "tags" file, which is used by the
  3597.           :tag command.   Its value must  be a string  constant, so be
  3598.           careful about quoting.
  3599.  
  3600.      -DCS_IBMPC -DCS_LATIN1 -DCS_SPECIAL
  3601.           The digraph  table and  flipcase option will  normally start
  3602.           out empty.  However, if you add -DCS_IBMPC or -DCS_LATIN1 to
  3603.           your  CFLAGS, then  they will start  out filled  with values
  3604.           that are appropriate for the IBM PC character set or the ISO
  3605.           Latin-1 character set, respectively.
  3606.  
  3607.           You can also use -DCS_IBMPC and -DCS_SPECIAL together to get
  3608.           digraphs that produce the PC's graphic characters.
  3609.  
  3610.      -DDEBUG -DEBUG2
  3611.           -DDEBUG adds the ":debug" and ":validate" commands, and also
  3612.           adds  many internal  consistency checks.   It  increases the
  3613.           size of the ".text" segment by about 6K.
  3614.  
  3615.           -DDEBUG2  causes a  line  to be  appended to  a file  called
  3616.           "debug.out" everytime any change is made to the edit buffer.
  3617.  
  3618.      -DCRUNCH
  3619.           This flag  removes some non-critical code,  so that Elvis is
  3620.           smaller.   For  example, it  removes  a  short-cut from  the
  3621.           regexp  package, so  that text  searches are  slower.  Also,
  3622.           screen updates  are not as  efficient.  A couple  of obscure
  3623.           features are disabled by this, too.
  3624.  
  3625.  
  3626.  
  3627.  
  3628.                                    - 3 -
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.      -DNO_MKEXRC
  3638.           This removes  the ":mkexrc" command,  so you have  to create
  3639.           any  .exrc files  manually.  The size  of the  .text segment
  3640.           will be reduced by about 1500 bytes.
  3641.  
  3642.      -DNO_CHARATTR
  3643.           Permanently disables the  charattr option.  This reduces the
  3644.           size of your ".text" segment by about 850 bytes.
  3645.  
  3646.      -DNO_RECYCLE
  3647.           Normally, Elvis will recycle space (from the temporary file)
  3648.           which  contains totally obsolete  text.  This  flag disables
  3649.           this recycling.   Without recycling, the  ".text" segment is
  3650.           about 1K  smaller than  it would  otherwise be, but  the tmp
  3651.           file grows much faster.  If you  have a lot of free space on
  3652.           your  hard  disk,  but  Elvis  is  too  bulky  to  run  with
  3653.           recycling, then try it without recycling.
  3654.  
  3655.           When using  a version of  Elvis that has  been compiled with
  3656.           -DNO_RECYCLE,  you should  be careful  to avoid  making many
  3657.           small changes to  a file because each individual change will
  3658.           cause  the tmp  file to  grow by at  least 1k.   Hitting "x"
  3659.           thirty  times counts  as  thirty changes,  but typing  "30x"
  3660.           counts as  one change.  Also,  you should occasionally  do a
  3661.           ":w" followed by a ":e" to start with a fresh tmp file.
  3662.  
  3663.           Interestingly,  the real  vi never  recycles space  from its
  3664.           temporary file.
  3665.  
  3666.      -DNO_SENTENCE
  3667.           Leaves out the "("  and ")" visual mode commands.  Also, the
  3668.           "[[", "]]",  "{", and "}" commands  will not recognize *roff
  3669.           macros.  The sections  and paragraphs options go away.  This
  3670.           saves about 650 bytes in the ".text" segment.
  3671.  
  3672.      -DNO_CHARSEARCH
  3673.           Leaves  out  the   visual  commands  which  locate  a  given
  3674.           character in  the current line: "f", "t",  "F", "T", "," and
  3675.           ";".  This saves about 900 bytes.
  3676.  
  3677.      -DNO_EXTENSIONS
  3678.           Leaves out the "K" and "#" visual commands.  Also, the arrow
  3679.           keys will no longer work in input mode.  Regular expressions
  3680.           will  no   longer  recognize  the   \{\}  operator.   (Other
  3681.           extensions are  either inherent in  the design of  Elvis, or
  3682.           are controlled by more specific flags, or are too tiny to be
  3683.           worth removing.) This saves about 250 bytes.
  3684.  
  3685.      -DNO_MAGIC
  3686.           Permanently disables the  "magic" option, so that most meta-
  3687.           characters  in a  regular expression  are  *NOT* recognized.
  3688.           This saves about 3k of space in the ".text" segment, because
  3689.           the complex regular  expression code can be replaced by much
  3690.           simpler code.
  3691.  
  3692.  
  3693.  
  3694.                                    - 4 -
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.      -DNO_SHOWMODE
  3704.           Permanently disables the "showmode" option, saving about 250
  3705.           bytes.
  3706.  
  3707.      -DNO_CURSORSHAPE
  3708.           Normally, Elvis tries to adjust the shape of the cursor as a
  3709.           reminder of which mode you're in.  The -DNO_CURSORSHAPE flag
  3710.           disables this, saving about 150 bytes.
  3711.  
  3712.      -DNO_DIGRAPH
  3713.           To  allow  entry  of  non-ASCII characters,  Elvis  supports
  3714.           digraphs.  A digraph is a single (non-ASCII) character which
  3715.           is entered as a combination of two other (ASCII) characters.
  3716.           If you don't need  to input non-ASCII characters, or if your
  3717.           keyboard  supports  a   better  way  of  entering  non-ASCII
  3718.           characters, then  you can disable the  digraph code and save
  3719.           about 450 bytes.
  3720.  
  3721.      -DNO_ERRLIST
  3722.           Elvis  adds  a   ":errlist"  command,  which  is  useful  to
  3723.           programmers.   If  you  don't  need  this feature,  you  can
  3724.           disable it via  the -DNO_ERRLIST flag.  This will reduce the
  3725.           .text segment  by about 900  bytes, and the  .bss segment by
  3726.           about 300 bytes.
  3727.  
  3728.      -DNO_ABBR
  3729.           The -DNO_ABBR flag disables the ":abbr" command, and reduces
  3730.           the size of Elvis by about 250 bytes.
  3731.  
  3732.      -DNO_OPTCOLS
  3733.           When  Elvis displays  the current  options settings  via the
  3734.           ":set"  command,  the   options  are  normally  sorted  into
  3735.           columns.   The -DNO_OPTCOLS  flag causes  the options  to be
  3736.           sorted  across  the  rows, which  is  much  simpler for  the
  3737.           computer.   The -DNO_OPTCOLS  flag will  reduce the  size of
  3738.           your .text segment by about 500 bytes.
  3739.  
  3740.      -DNO_MODELINES
  3741.           This removes all support for modelines.
  3742.  
  3743.      -DNO_TAG
  3744.           This disables tag lookup.   It reduces the size of the .text
  3745.           segment by about 750 bytes.
  3746.  
  3747.      -DNO_TAGSTACK
  3748.           This disables  the tagstack.  The ^T  and :pop commands will
  3749.           no longer be available.
  3750.  
  3751.      -DNO_ALT_FKEY, -DNO_CTRL_FKEY, -DNO_SHIFT_FKEY, -DNO_FKEY
  3752.           These   remove   explicit    support   of   function   keys.
  3753.           -DNO_ALT_FKEY removes  support for the  <alternate> versions
  3754.           function  keys.   -DNO_CTRL_FKEY  removes  support  for  the
  3755.           <control>   and    <alternate>   versions   function   keys.
  3756.           -DNO_SHIFT_FKEY removes support  for the <shift>, <control>,
  3757.  
  3758.  
  3759.  
  3760.                                    - 5 -
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.           and <alternate>  versions function keys.   -DNO_FKEY removes
  3769.           all support of function keys.
  3770.  
  3771.           Elvis's  ":map"  command  normally  allows  you to  use  the
  3772.           special  sequence  "#<n>"  to  map  function key  <n>.   For
  3773.           example,  ":map #1  {!}fmt^M"  will cause  the  <F1> key  to
  3774.           reformat a  paragraph.  Elvis checks the  :k1=: field in the
  3775.           termcap description of your terminal to figure out what code
  3776.           is sent  by the <F1>  key.  This is handy  because it allows
  3777.           you to create a .exrc file which maps function keys the same
  3778.           way regardless of what type of terminal you use.
  3779.  
  3780.           That behaviour is standard; most implementations of the real
  3781.           vi supports it too.  Elvis  extends this to allow you to use
  3782.           "#1s"  to   refer  to   <shift>+<F1>,  "#1c"  to   refer  to
  3783.           <control>+<F1>,  and  "#1a"  to  refer to  <alt>+<F1>.   The
  3784.           termcap  description  for the  terminal  should have  fields
  3785.           named :s1=:c1=:a1=: respectively, to define the code sent by
  3786.           these   key    conbinations.    (You   should    also   have
  3787.           :k2=:s2=:c2=:a2=: for the <F2> key, and so on.)
  3788.  
  3789.           But there  may be  problems.  The terminfo  database doesn't
  3790.           support :s1=:c1=:a1=:,  so no terminfo  terminal description
  3791.           could ever  support shift/control/alt function  keys; so you
  3792.           might as well  add -DNO_SHIFT_FKEY to CFLAGS if you're using
  3793.           terminfo.
  3794.  
  3795.           Note  that,  even  if you  have  -DNO_FKEYS,  you can  still
  3796.           configure  Elvis to  use your function  keys my  mapping the
  3797.           literal character codes  sent by the key.  You just couldn't
  3798.           do it in a terminal-independent way.
  3799.  
  3800.      -DTERM_925, -DTERM_AMIGA, -DTERM_VT100, -DTERM_VT52, etc.
  3801.           The  tinytcap.c   file  contains  descriptions   of  several
  3802.           terminal  types.   For each  system  that  uses tinytcap,  a
  3803.           reasonable subset of  the available descriptions is actually
  3804.           compiled into  Elvis.  If you  wish to enlarge  this subset,
  3805.           then  you can  add the appropriate  -DTERM_XXX flag  to your
  3806.           CFLAGS settings.
  3807.  
  3808.           For  a  list  of the  available  terminal  types, check  the
  3809.           tinytcap.c file.
  3810.  
  3811.      -DINTERNAL_TAGS
  3812.           Normally,  Elvis  uses  the  "ref"  program to  perform  tag
  3813.           lookup.   This  is  more powerful  than  the  real vi's  tag
  3814.           lookup, but it can be much slower.
  3815.  
  3816.           If  you add  -DINTERNAL_TAGS  to your  CFLAGS setting,  then
  3817.           Elvis will  use its own  internal tag lookup  code, which is
  3818.           faster.
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.  
  3825.  
  3826.                                    - 6 -
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.      -DPRSVDIR=directory
  3836.           This  controls where  preserved  files will  be placed.   An
  3837.           appropriate  default  has  been  chosen for  each  Operating
  3838.           System, so you probably don't need to worry about it.
  3839.  
  3840.      -DFILEPERMS=number
  3841.           This  affects the  attributes of files  that are  created by
  3842.           Elvis;  it is  used as  the second  argument to  the creat()
  3843.           function.   The default  is 0666 which  (on UNIX  systems at
  3844.           least) means  that anybody can  read or write  the new file,
  3845.           but  nobody can  execute it.  On  UNIX systems,  the creat()
  3846.           call modifies this via the umask setting.
  3847.  
  3848.      -DKEYBUFSIZE=number
  3849.           This determines the size of the type-ahead buffer that elvis
  3850.           uses.   It  also limits  the  size of  keymaps  that it  can
  3851.           handle.   The default  is 1000  characters, which  should be
  3852.           plenty.
  3853.  
  3854.  
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.  
  3891.  
  3892.                                    - 7 -
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.      11.  TERMCAP
  3901.  
  3902.           Elvis uses  fairly standard termcap fields  for most things.
  3903.      I invented  the cursor shape  names and some of  the function key
  3904.      names, but other than that there should be few surprises.
  3905.  
  3906.      Required numeric fields
  3907.           :co#:       number of columns on the screen (chars per line)
  3908.           :li#:       number of lines on the screen
  3909.  
  3910.      Required string fields
  3911.           :ce=:       clear to end-of-line
  3912.           :cl=:       home the cursor & clear the screen
  3913.           :cm=:       move the cursor to a given row/column
  3914.           :up=:       move the cursor up one line
  3915.  
  3916.      Boolean fields
  3917.           :am:        auto margins - wrap when char is written in last column?
  3918.           :xn:        brain-damaged auto margins - newline ignored after wrap
  3919.           :pt:        physical tabs?
  3920.  
  3921.      Optional string fields
  3922.           :al=:       insert a blank row on the screen
  3923.           :dl=:       delete a row from the screen
  3924.           :cd=:       clear to end of display
  3925.           :ei=:       end insert mode
  3926.           :ic=:       insert a blank character
  3927.           :im=:       start insert mode
  3928.           :dc=:       delete a character
  3929.           :sr=:       scroll reverse (insert row at top of screen)
  3930.           :vb=:       visible bell
  3931.           :ks=:       keypad enable
  3932.           :ke=:       keypad disable
  3933.           :ti=:       terminal initialization string, to start full-screen mode
  3934.           :te=:       terminal termination, to end full-screen mode
  3935.  
  3936.      Optional strings received from the keyboard
  3937.           :kd=:       sequence sent by the <down arrow> key
  3938.           :kl=:       sequence sent by the <left arrow> key
  3939.           :kr=:       sequence sent by the <right arrow> key
  3940.           :ku=:       sequence sent by the <up arrow> key
  3941.           :kP=:       sequence sent by the <PgUp> key
  3942.           :kN=:       sequence sent by the <PgDn> key
  3943.           :kh=:       sequence sent by the <Home> key
  3944.           :kH=:       sequence sent by the <End> key
  3945.           :kI=:       sequence sent by the <Insert> key
  3946.  
  3947.           Originally, termcap  didn't have  any names for  the <PgUp>,
  3948.      <PgDn>, <Home>,  and <End>  keys.  Although the  capability names
  3949.      shown  in the  table  above are  the  most common,  they are  not
  3950.      universal.   SCO  Xenix uses  :PU=:PD=:HM=:EN=:  for those  keys.
  3951.      Also, if the  four arrow keys happen to be  part of a 3x3 keypad,
  3952.      then the five non-arrow keys may be named :K1=: through :K5=:, so
  3953.      an IBM  PC keyboard may  be described using  those names instead.
  3954.      Elvis can find any of these names.
  3955.  
  3956.  
  3957.  
  3958.                                    - 1 -
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.      Optional strings sent by function keys
  3968.           :k1=:...:k9=:k0=:   codes sent by <F1> through <F10> keys
  3969.           :s1=:...:s9=:s0=:   codes sent by <Shift F1> ... <Shift F10>
  3970.           :c1=:...:c9=:c0=:   codes sent by <Ctrl F1> ... <Ctrl F10>
  3971.           :a1=:...:a9=:a0=:   codes sent by <Alt F1> ... <Alt F10>
  3972.  
  3973.           Note that  :k0=: is  used to  describe the <F10>  key.  Some
  3974.      termcap documents  recommend :ka=:  or even :k;=:  for describing
  3975.      the <F10> key, but Elvis doesn't support that.
  3976.  
  3977.           Also, the  :s1=:..., :c1=:...,  and :a1=:... codes  are very
  3978.      non-standard.   The   terminfo  library  doesn't   support  them.
  3979.      Consequently, if you're using the terminfo library then you might
  3980.      as well add -DNO_SHIFT_FKEY to your CFLAGS setting.
  3981.  
  3982.      Optional fields that describe character attributes
  3983.           :so=:se=:   start/end standout mode (We don't care about :sg#:)
  3984.           :us=:ue=:   start/end underlined mode
  3985.           :md=:me=:   start/end boldface mode
  3986.           :as=:ae=:   start/end alternate character set (italics)
  3987.           :ug#:       visible gap left by :us=:ue=:md=:me=:as=:ae=:
  3988.  
  3989.      Optional fields that affect the cursor's shape
  3990.  
  3991.           The :cQ=: string is used by Elvis immediately before exiting
  3992.      to undo the effects of  the other cursor shape strings.  If :cQ=:
  3993.      is not given, then all other cursor shape strings are ignored.
  3994.           :cQ=:       normal cursor
  3995.           :cX=:       cursor used for reading EX command
  3996.           :cV=:       cursor used for reading VI commands
  3997.           :cI=:       cursor used during VI input mode
  3998.           :cR=:       cursor used during VI replace mode
  3999.  
  4000.           If the capabilities  above aren't given, then Elvis will try
  4001.      to use the following values instead.
  4002.           :ve=:       normal cursor, used as :cQ=:cX=:cI=:cR=:
  4003.           :vs=:       gaudy cursor, used as :cV=:
  4004.  
  4005.      An example
  4006.  
  4007.           Here's the termcap entry I use on my Minix-ST system.
  4008.  
  4009.      mx|minix|minixst|ansi:\
  4010.                  :is=\E[0~:co#80:li#25:bs:pt:\
  4011.                  :cm=\E[%i%d;%dH:up=\E[A:do=^J:nd=\E[C:sr=\EM:\
  4012.                  :cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
  4013.                  :al=\E[L:dl=\E[M:ic=\E[@:dc=\E[P:im=:ei=:\
  4014.                  :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\
  4015.                  :md=\E[1m:me=\E[m:as=\E[1;3m:ae=\E[m:\
  4016.                  :ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
  4017.                  :k1=\E[1~:k2=\E[2~:k3=\E[3~:k4=\E[4~:k5=\E[5~:\
  4018.                  :k6=\E[6~:k7=\E[17~:k8=\E[18~:k9=\E[19~:k0=\E[20~:
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.                                    - 2 -
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.      12.  ENVIRONMENT VARIABLES
  4033.  
  4034.           Elvis examines several  environment variables when it starts
  4035.      up.   The values  of these  variables are  used internally  for a
  4036.      variety of  purposes.  You don't need to define  all of these; on
  4037.      most  systems,  Elvis  only  requires  TERM  to be  defined.   On
  4038.      AmigaDOS, MS-DOS or TOS systems, even that is optional.
  4039.  
  4040.      TERM, TERMCAP
  4041.           TERM  tells Elvis  the  name of  the termcap  entry to  use.
  4042.           TERMCAP may contain  either the entire termcap entry, or the
  4043.           full pathname of the termcap file to search through.
  4044.  
  4045.           If your  version of Elvis  is using tinytcap  instead of the
  4046.           full termcap library, then the value of TERMCAP can't be the
  4047.           name of  a file;  it can only  be undefined, or  contain the
  4048.           entire termcap  entry.  In the termcap  entry, tinytcap will
  4049.           convert  \E  to  an  <Esc>  character, but  other  backslash
  4050.           escapes (\b, \r, etc.)  or carat escapes (^[, ^M, etc.) will
  4051.           not be converted to control characters.  Instead, you should
  4052.           embed the actual control character into the string.
  4053.  
  4054.      TMP, TEMP
  4055.           These only work  for AmigaDOS, MS-DOS and Atari TOS.  Either
  4056.           of  these  variables  may be  used  to  set the  "directory"
  4057.           option, which controls where temporary files are stored.  If
  4058.           you define them both, then TMP is used, and TEMP is ignored.
  4059.  
  4060.      LINES, COLUMNS
  4061.           The termcap entry  for your terminal should specify the size
  4062.           of your screen.  If you're using a windowing interface, then
  4063.           there is an ioctl() call  which will provide the size of the
  4064.           window; the  ioctl() values will override  the values in the
  4065.           termcap entry.  The  LINES and COLUMNS environment variables
  4066.           (if defined)  will override either of  these sources.  They,
  4067.           in turn, can be overridden by a ":set" command.
  4068.  
  4069.           Normally, the LINES  and COLUMNS variables shouldn't need to
  4070.           be defined.
  4071.  
  4072.      EXINIT
  4073.           This  variable's value  may contain  one or  more colon-mode
  4074.           commands, which  will be executed  after all of  the ".exrc"
  4075.           files but before interactive editing begins.
  4076.  
  4077.           To put more than one command in EXINIT, you can separate the
  4078.           commands with either a newline or a '|' character.
  4079.  
  4080.      SHELL, COMSPEC
  4081.           You can use COMSPEC in MS-DOS, or SHELL in any other system,
  4082.           to specify which shell should be used for executing commands
  4083.           and expanding wildcards.
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.                                    - 1 -
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.      HOME This  variable should  give the full  pathname of  your home
  4100.           directory.   Elvis  needs  to know  the  name  of your  home
  4101.           directory so it can locate the ".exrc" file there.
  4102.  
  4103.      TAGPATH
  4104.           This variable  is used by the "ref"  program.  It contains a
  4105.           list  of directories  that might  contain a  relevent "tags"
  4106.           file.  Under AmigaDOS, MS-DOS or Atari TOS, the names of the
  4107.           directories should be  separated by semicolons (";").  Under
  4108.           other operating  systems, the  names should be  separated by
  4109.           colons (":").
  4110.  
  4111.           If you  don't define TAGPATH, then "ref"  will use a default
  4112.           list which  includes the current  directory and a  few other
  4113.           likely  places.  See  the  definition of  DEFTAGPATH at  the
  4114.           start of ref.c for an accurate list.
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.  
  4155.  
  4156.                                    - 2 -
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.      13.  VERSIONS
  4165.  
  4166.           Elvis currently  works under  BSD UNIX, AT&T  System-V UNIX,
  4167.      SCO XENIX, Minix,  Coherent, MS-DOS, Atari TOS, OS9/68k, VAX/VMS,
  4168.      and  AmigaDos.   This  section  of  the manual  provides  special
  4169.      information that applies to each particular version of Elvis.
  4170.  
  4171.           For   all  versions   except  MS-DOS   and  VMS,   the  file
  4172.      "Makefile.mix" should be copied to "Makefile", and then edited to
  4173.      select the correct set of options for your system.  There is more
  4174.      information about this embedded in the file itself.
  4175.  
  4176.      13.1 BSD UNIX
  4177.  
  4178.           Temporary files are stored in /tmp.
  4179.  
  4180.           You  should  modify  /etc/rc  so  that  the temp  files  are
  4181.      preserved when  the system is  rebooted.  Find a  line in /etc/rc
  4182.      which reads
  4183.  
  4184.           ex4.3preserve /tmp
  4185.  
  4186.      or something like that, and append the following line:
  4187.  
  4188.           elvprsv /tmp/elv*
  4189.  
  4190.           If you do not have permission to modify /etc/rc, don't fret.
  4191.      The above  modification is  only needed  to allow you  to recover
  4192.      your  changes after  a  system crash.   You can  still run  Elvis
  4193.      without that modification, and you can still recover your changes
  4194.      when Elvis  crashes or when your dialup  modem looses the carrier
  4195.      signal, or  something like  that.  Only  a system crash  or power
  4196.      failure could hurt you.
  4197.  
  4198.           Both Elvis and the real Vi read initialization commands from
  4199.      a file  called ".exrc", but the commands in  that file might work
  4200.      on   one  editor   but  not   the   other.   For   example,  "set
  4201.      keywordprg=man" will work for Elvis, but Vi will complain because
  4202.      it doesn't  have a "keywordprg" option.   If the warning messages
  4203.      annoy you,  then you can edit the CFLAGS  setting in the Makefile
  4204.      and add -DEXRC=\".elvisrc\".
  4205.  
  4206.           If you  use X windows, you may wish  to add "-DCS_LATIN1" to
  4207.      CFLAGS.   This will  cause  the digraph  table  and the  flipcase
  4208.      option to have default values that are appropriate for the LATIN-
  4209.      1 character set.  That's the standard character set for X.
  4210.  
  4211.           The default mailer  used notify users when text is preserver
  4212.      is  "mail".  You  may  wish to  change  this to  "Mail" (with  an
  4213.      uppercase 'M').   See the description  of "MAILER" in  the CFLAGS
  4214.      section of this manual.
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.  
  4221.  
  4222.                                    - 1 -
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.           The default keyboard  macro time-out value is larger for BSD
  4231.      than  it is  for  some other  systems, because  I've had  trouble
  4232.      running Elvis via rlogin or Xterm.   I guess it takes a while for
  4233.      those keystokes to squirt through the net.
  4234.  
  4235.      13.2 System-V UNIX
  4236.  
  4237.           Most SysV UNIX  systems use terminfo instead of termcap, but
  4238.      the  terminfo  library  doesn't seem to have a standard name.  As
  4239.      shipped,  Elvis'  Makefile.mix    is   configured   with  "LIBS=-
  4240.      ltermcap".  You may need to change it to "LIBS=-lterm" or "LIBS=-
  4241.      lterminfo" or even "LIBS=-lcurses".
  4242.  
  4243.           The /etc/rc  file (or its equivelent)  should be modified as
  4244.      described for  BSD systems, above.  There's  a pretty good chance
  4245.      that "make install" will do this  for you; it knows how to create
  4246.      an  editor recovery  file in the  /etc/rc2.d directory,  which is
  4247.      where  most modern  SysV systems  store  initialization commands.
  4248.      You only need to do it manually for older SysV systems.
  4249.  
  4250.           The potential  trouble with ".exrc" described  above for BSD
  4251.      UNIX applies to System-V UNIX as well.
  4252.  
  4253.           The default mailer  used notify users when text is preserver
  4254.      is  "mail".  You  may wish  to change this  to "mailx".   See the
  4255.      description of "MAILER" in the CFLAGS section of this manual.
  4256.  
  4257.           Elvis uses control-C as the interrupt key, not Delete.  This
  4258.      was  done so  that  the <Del>  key  could be  used for  character
  4259.      deletion.
  4260.  
  4261.      13.3 SCO Xenix
  4262.  
  4263.           For Xenix-386,  you can  use the generic  System-V settings.
  4264.      You may  wish to add "-DCS_IBMPC" to CFLAGS,  to have the digraph
  4265.      table and flipcase option start  up in a mode that is appropriate
  4266.      for the  console.  Also, note  that there is a  separate group of
  4267.      settings for use  with Xenix-286.  It already has "-DCS_IBMPC" in
  4268.      CFLAGS.
  4269.  
  4270.           Because Xenix  is so similar to  System-V, everything I said
  4271.      earlier about  System-V applies to the  Xenix version too, except
  4272.      that  editor   recovery  might  belong  in   a  directory  called
  4273.      /etc/rc.d/8 instead.
  4274.  
  4275.      13.4 Minix
  4276.  
  4277.           There are separate settings in Makefile.mix for Minix-PC and
  4278.      Minix-68k.  The  differences between these  two are that  the 68k
  4279.      version  uses ".o"  for the  object file  extension where  the PC
  4280.      version uses  ".s", and  the PC version  has some extra  flags in
  4281.      CFLAGS to  reduce the  size of Elvis.   The PC version  also uses
  4282.      tinytcap (instead of the full termcap) to make it smaller.
  4283.  
  4284.  
  4285.  
  4286.  
  4287.  
  4288.                                    - 2 -
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.           Minix-PC users should read the CFLAGS section of this manual
  4297.      very carefully.  You have some choices to make...
  4298.  
  4299.           The temporary  files are  stored in /usr/tmp.   The /usr/tmp
  4300.      directory  must  exist  before you  run  Elvis,  and  it must  be
  4301.      readable  & writable  by everybody.  We  use /usr/tmp  instead of
  4302.      /tmp  because after  a  system crash  or power  failure, you  can
  4303.      recover the altered version of  a file from the temporary file in
  4304.      /usr/tmp.  If  it was  stored in /tmp,  though, then it  would be
  4305.      lost because  /tmp is  normally located  on the RAM  disk.  Also,
  4306.      you'll  need  a  /usr/preserve  directory  which  is  readable  &
  4307.      writable by root; this directory is used to store text files that
  4308.      have  been preserved  after a crash.   The "make  install" script
  4309.      will create it if necessary.
  4310.  
  4311.           Elvis uses control-C as the interrupt key, not Delete.
  4312.  
  4313.      13.5 Coherent
  4314.  
  4315.           Elvis was ported to Coherent by Esa Ahola.
  4316.  
  4317.           Elvis  is  too  large  to  run  under  Coherent  unless  you
  4318.      eliminate some features  via the CFLAGS setting.  The recommended
  4319.      settings,  in Makefile.mix,  produce a  working version  of Elvis
  4320.      which emulates  Vi faithfully, but lacks  most of the extensions.
  4321.      You should read the CFLAGS section of this manual carefully.
  4322.  
  4323.           You  can  probably   reduce  the  size  of  Elvis  by  using
  4324.      tinytcap.c instead of -lterm.   This would allow you to keep most
  4325.      features  of  Elvis, at  the  expense  of terminal  independence.
  4326.      (Tinytcap.c has ANSI escape sequences hard-coded into it.) To use
  4327.      tinytcap,  just add  "tinytcap.o"  to the  "EXTRA="  line in  the
  4328.      Makefile, and remove "-lterm" from the "LIBS=" line.
  4329.  
  4330.           The temporary files are stored in /tmp.  Preserved files are
  4331.      stored in /usr/preserve.   You should modify your /etc/rc file to
  4332.      support file file preservation; add the line...
  4333.  
  4334.           /usr/bin/elvprsv /tmp/*
  4335.  
  4336.  
  4337.      13.6 MS-DOS
  4338.  
  4339.           Elvis  was ported  to  MS-DOS by  Guntram  Blohm and  Martin
  4340.      Patzel.  Willett Kempton added support for the DEC Rainbow.
  4341.  
  4342.           Ideally, Elvis should  be compiled with Microsoft C 5.10 and
  4343.      the  standard  Microsoft  Make  utility,  via the  command  "make
  4344.      elvis.mak".  This will compile Elvis and all related utilities.
  4345.  
  4346.           With  Microsoft  C  6.00,  you  may have  trouble  compiling
  4347.      regexp.c.  If so, try compiling it without optimization.
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.                                    - 3 -
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.           The "Makefile.mix" file contains a set of suggested settings
  4363.      for  compiling Elvis  with Turbo-C  or Borland  C.  (If  you have
  4364.      Turbo-C, but  not the Make  utility, then you can  almost use the
  4365.      "Elvis.prj" file to  compile Elvis, but you must explicitly force
  4366.      Turbo-C to  compile it with  the "medium" memory  model.  Most of
  4367.      the related  programs [ctags,  ref, virec, refont,  and wildcard]
  4368.      are only  one file long, so you should  have no trouble compiling
  4369.      them.) The  "alias.c" file is  meant to be compiled  once into an
  4370.      executable  named "ex.exe".   You  should then  copy "ex.exe"  to
  4371.      "vi.exe" and "view.exe".
  4372.  
  4373.           Elvis stores its temporary  files in C:\tmp.  If this is not
  4374.      satisfactory,  then  you  should edit  the  CFLAGS  line of  your
  4375.      Makefile  to change  TMPDIR to  something else  before compiling.
  4376.      You  can also  control  the name  of  the temp  directory via  an
  4377.      environment variable named TMP or TEMP.  The directory must exist
  4378.      before you can run Elvis.
  4379.  
  4380.           The  TERM  environment variable  determines  how Elvis  will
  4381.      write to the  screen.  It can be set to  any one of the following
  4382.      values:
  4383.                     pcbios    Use BIOS calls on an IBM-PC clone.
  4384.                     rainbow   Use DEC Rainbow interface.
  4385.                     ansi      Use ANSI.SYS driver.
  4386.                     nansi     User faster NANSI.SYS driver.
  4387.  
  4388.           If   the  TERM   variable   isn't  set,   then  Elvis   will
  4389.      automatically select either  the "rainbow" interface (when run on
  4390.      a Rainbow) or "pcbios" (on an IBM clone).
  4391.  
  4392.           You may  prefer to use NANSI.SYS for speed;  or you may NEED
  4393.      to use ANSI.SYS  for a non-clone, such as a  lap-top.  If so, you
  4394.      should  install  one   of  these  drivers  by  adding  "driver  =
  4395.      nansi.sys" (or  whatever) to your  CONFIG.SYS file, and  then you
  4396.      should define  TERM to  be "nansi"  (or whatever) by  adding "set
  4397.      TERM=nansi" to your  AUTOEXEC.BAT file.  You must then reboot for
  4398.      these changes to take  effect.  After that, Elvis will notice the
  4399.      "TERM" setting and use the driver.
  4400.  
  4401.           Since  ".exrc"  is not a valid DOS filename, the name of the
  4402.      initialization file has been changed to "elvis.rc".   Elvis  will
  4403.      look  for an "elvis.rc" file first in your home directory.  If it
  4404.      exists, and contains  ":set exrc",  then  Elvis  will  check  for
  4405.      another  "elvis.rc"  in  the  current directory.  By default, the
  4406.      directory where ELVIS.EXE  resides  is  taken  to  be  your  home
  4407.      directory.    You   can  override  this  default  by  setting  an
  4408.      environment variable named "HOME" to the full  pathname  of  your
  4409.      home  directory.   To  set  "HOME",  you  would typically add the
  4410.      following line to your AUTOEXEC.BAT file:
  4411.  
  4412.           set HOME c:\
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.                                    - 4 -
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.           An extra  program, called "wildcard", is  needed for MS-DOS.
  4429.      It expands wildcard characters in file names.  If Elvis flashes a
  4430.      "Bad  command or  filename" message when  it starts,  then you've
  4431.      probably lost the WILDCARD.EXE program somehow.
  4432.  
  4433.           Elvis  can  run under Windows, but you may have trouble with
  4434.      TEMP.  Windows uses  an  environment variable  called TEMP  which
  4435.      interferes with  Elvis' usage of  TEMP; to work  around this, you
  4436.      can simply set an environment variable named TMP (with no 'E') to
  4437.      the name  of Elvis' temporary  directory.  When TEMP  and TMP are
  4438.      both set, Elvis uses TMP and ignored TEMP.
  4439.  
  4440.      13.7 Atari TOS
  4441.  
  4442.           Elvis was  ported to Atari  TOS by Guntram  Blohm and Martin
  4443.      Patzel.  It  is very similar to the MS-DOS  version.  It has been
  4444.      tested with the Mark Williams C compiler and also GNU-C.
  4445.  
  4446.           The TERM environment variable is ignored; the ST port always
  4447.      assumes that TERM=vt52.  The SHELL (not COMSPEC!) variable should
  4448.      be set to the name of a line-oriented shell.
  4449.  
  4450.           A simple  shell in  included with  Elvis.  Its source  is in
  4451.      "shell.c", and  the name of  the executable is  "shell.ttp".  The
  4452.      file  "profile.sh" should  contain a  set  of instructions  to be
  4453.      executed when the shell first starts up.  An example of this file
  4454.      is included, but you will  almost certainly want to edit it right
  4455.      away  to  match  your  configuration.   (If  you already  have  a
  4456.      command-line shell,  then you'll probably want  to continue using
  4457.      it.  The shell that comes with Elvis is very limited.)
  4458.  
  4459.           Currently, character  attributes cannot be  displayed on the
  4460.      screen.
  4461.  
  4462.           Elvis  runs under  MiNT (a  free multi-tasking  extension to
  4463.      TOS) but it can be a  CPU hog because of the way that Elvis reads
  4464.      from the  keyboard with timeout.  Also, Elvis  doesn't use any of
  4465.      the special  features of MiNT.  I have received  a set of patches
  4466.      that  optimize  Elvis for  MiNT,  but they  arrived  too late  to
  4467.      integrate into this release.
  4468.  
  4469.      13.8 OS9/68k
  4470.  
  4471.           Elvis was ported to OS9/68k by Peter Reinig.
  4472.  
  4473.           The Makefile  is currently  configured to install  Elvis and
  4474.      the   related  programs   in   /dd/usr/cmds  If   this  this   is
  4475.      unacceptable,  then you  should change  the  BIN setting  to some
  4476.      other directory.  Similarly, it expects the source code to reside
  4477.      in /dd/usr/src/elvis; the ODIR setting is used to control this.
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486.                                    - 5 -
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.           Temporary files  are stored in the  /dd/tmp directory.  Your
  4495.      /dd/startup  file may  need  to be  modified to  prevent it  from
  4496.      deleting Elvis' temporary files; make /dd/startup run the elvprsv
  4497.      program before it wipes out /dd/tmp.
  4498.  
  4499.           The program  in alias.c is linked  repeatedly to produce the
  4500.      "vi",  "view", and  "input" aliases for  Elvis.  Sadly,  the "ex"
  4501.      alias is impossible to  implement under OS9 because the shell has
  4502.      a built-in command by that name.
  4503.  
  4504.           For  some purposes,  you must give  `make' the  "-b" option.
  4505.      Specifically,  you need  this for  "make -b  clean" and  "make -b
  4506.      install".
  4507.  
  4508.      13.9 VAX/VMS
  4509.  
  4510.           John Campbell ported Elvis to VAX/VMS.
  4511.  
  4512.           A heavily laden VAX can  take half an hour to compile Elvis.
  4513.      This is normal.  Don't panic.
  4514.  
  4515.           While  running,   Elvis  will  create   temporary  files  in
  4516.      SYS$SCRATCH.  Enter  SHOW LOGICAL SYS$SCRATCH to  see what actual
  4517.      directory   you   are  using.    Many   sites  have   SYS$SCRATCH
  4518.      equivalenced to  SYS$LOGIN.  The Elvis temporary  files look like
  4519.      the following on VMS while Elvis is running:
  4520.              ELV_1123A.1;1       ELV_1123A.2;1       SO070202.;1
  4521.  
  4522.           Also, filtering commands  (like !!dir and !}fmt) should work
  4523.      on  VMS.  This  assumes, however, that  you can  create temporary
  4524.      mailboxes and that your  mailbox quota (a sysgen parameter) is at
  4525.      least 256 bytes  for a single write to the  mailbox.  This is the
  4526.      default  sysgen parameter,  so  there should  be  few people  who
  4527.      experience filter problems.
  4528.  
  4529.           Additionally, an  attempt was  made to support  the standard
  4530.      terminals  on VMS:  "vt52", "vt100",  "vt200",  "vt300", "vt101",
  4531.      "vt102".   Non-standard terminals could  be supported  by setting
  4532.      your terminal type  to UNKNOWN (by entering SET TERM/UNKNOWN) and
  4533.      defining  the  logical   name  ELVIS_TERM.   Whatever  ELVIS_TERM
  4534.      translates to,  however, will have to  be included in tinytcap.c.
  4535.      Note that  the upper/lowercase distinctions  are significant, and
  4536.      that DCL will upshift  characters that are not quoted strings, so
  4537.      enter  DEFINE  ELVIS_TERM "hp2621a".   As  distributed, it  would
  4538.      probably  not be  a  good idea  to  have more  than the  standard
  4539.      terminals in  tinytcap.c (else it  wouldn't be tiny,  would it?).
  4540.      Changes here,  of course, would  require a recompilation  to take
  4541.      effect.
  4542.  
  4543.           If you have a  version of the "termcap" library and database
  4544.      on your  system, then you  may wish to replace  tinytcap with the
  4545.      real termcap.
  4546.  
  4547.  
  4548.  
  4549.  
  4550.  
  4551.  
  4552.                                    - 6 -
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.      13.10 AmigaDOS
  4560.  
  4561.           Mike Rieser and Dale Rahn ported Elvis to AmigaDOS.
  4562.  
  4563.           The port  was done using  Manx Aztec C  version 5.2b.  Elvis
  4564.      uses about  as much space as  it can and still  be small code and
  4565.      data.  Elvis should also  compile under DICE, though there may be
  4566.      a little trouble with signed versus unsigned chars.
  4567.  
  4568.           The port  has been  done so the  same binary will  run under
  4569.      both versions  of AmigaDOS.  Under AmigaDOS  2.04, Elvis supports
  4570.      all the  documented features.  It  also uses an  external program
  4571.      ref to  do tag  lookup.  So,  the accompanying programs:  ref and
  4572.      ctags are recommended.   Under AmigaDOS 1.2/1.3 Elvis works, buts
  4573.      lacks the more advanced features.
  4574.  
  4575.           For  the port  to AmigaDOS  2.04,  we tried  to use  as many
  4576.      Native AmigaDOS calls  as we could.  This should increase Elvis's
  4577.      chances at  being compiled with  other compilers.  DICE  seems to
  4578.      have  a different  default char  type.  You may  need to  use the
  4579.      UCHAR() macro in tio.c.  To test  it, try the :map command; if it
  4580.      looks right, things are cool.
  4581.  
  4582.           For  the port  to AmigaDOS  1.3, we tried  to make  sure the
  4583.      program  was at  least usable.  Many  features are  missing, most
  4584.      notably running  commands in subshells.  Also,  what we could get
  4585.      working, we used Aztec functions to support them, so this part is
  4586.      little more compiler dependent.
  4587.  
  4588.           Aztec  is  compatible  with  the  SAS  libcall  #pragma.   I
  4589.      personally  prefer using  the includes  that come  from Commodore
  4590.      over the ones supplied with Aztec, but for people with a straight
  4591.      Aztec installation,  I went with the default  names for the Aztec
  4592.      pragmas.
  4593.  
  4594.           One  include you'll  need is  <sys/types.h>.  It's  a common
  4595.      include when porting software just make yourself one.  It's a two
  4596.      line  file that  saves a  lot of hassle  especially in  the Elvis
  4597.      source.   So, make  a directory where  your includes  are located
  4598.      called `sys' and in a file below that type:
  4599.              /* sys/types.h */
  4600.              #include <exec/types.h>
  4601.  
  4602.           When setting environment  variables (either local or global)
  4603.      for variables  that specify a  directory, make sure  the variable
  4604.      ends in `:' or `/'.  This saved from having to change much of the
  4605.      way Elvis  works.  The default  temporary directory (if  TEMP and
  4606.      TMP aren't specified) is "T:".  The default if HOME directory (if
  4607.      no HOME environment variable is set) is "S:".
  4608.  
  4609.           To  avoid  conlict  with  other  uses, Elvis  uses  elvis.rc
  4610.      instead of .exrc or where it looks for macros.
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.  
  4617.  
  4618.                                    - 7 -
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.      13.11 Other Systems
  4626.  
  4627.           For SunOS and Solaris 1.x, use the BSD settings; for Solaris
  4628.      2.x,  use the  SysV settings.  Earlier  versions of  Elvis didn't
  4629.      link  correctly due  to a  quirk in Sun's  version of  the "make"
  4630.      utility, but  this version  of Elvis  has a work-around  for that
  4631.      quirk so you should have no trouble at all.
  4632.  
  4633.           For  Linux, use  the SysV settings.   You can  probably just
  4634.      remove  the "-lterm"  from the "LIBS=  -lterm" line,  since linux
  4635.      keeps the termcap functions in the standard C library.
  4636.  
  4637.           For  other UNIXoid  systems, I  suggest  you start  with the
  4638.      Minix-68k  settings and  then grow  from that.   Minix is  a nice
  4639.      starting point because it is a clone of Version 7 UNIX, which was
  4640.      the  last  common  ancestor  of  BSD  UNIX and  SysV  UNIX.   Any
  4641.      Operating System which claims any UNIX compatibility what so ever
  4642.      will  therefore support  V7/Minix code.  You  may need  to fiddle
  4643.      with #include  directives or  something, though.  Minix-68k  is a
  4644.      better starting  point than Minix-PC because  the PC compiler has
  4645.      some severe quirks.
  4646.  
  4647.           If you're thinking of porting Elvis to some non-UNIX system,
  4648.      I suggest  you begin by studying the  "INTERNALS" section of this
  4649.      manual.
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.  
  4683.  
  4684.                                    - 8 -
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.      14.  QUESTIONS & ANSWERS
  4693.  
  4694.  
  4695.      1)  How can I make Elvis run faster under DOS?
  4696.  
  4697.              There are several things you can  do.  The first thing to
  4698.              do is get a  good screen driver such  as NANSI.SYS.  This
  4699.              can speed up screen  redrawing by as much  as a factor of
  4700.              eight!  The DOS-specific part of section 12 tells you how
  4701.              to do this.
  4702.  
  4703.              You might also  consider reducing the size  of the blocks
  4704.              that Elvis uses.   You'll need  to recompile Elvis  to do
  4705.              this.  The  default  BLKSIZE  is 1024  byte  for the  DOS
  4706.              version of  Elvis, which  means that  for  each keystroke
  4707.              that you insert, Elvis must shift an average of about 500
  4708.              bytes.  That's a lot to ask  from a little old 5MHz 8088.
  4709.              A BLKSIZE of 512 bytes might be more appropriate.
  4710.  
  4711.              If you're really desperate for more speed, you might want
  4712.              to make Elvis  store its temporary  files on a  RAM disk.
  4713.              However, this limits the  size of the file  you can edit,
  4714.              and it eliminates any chance you  may have had to recover
  4715.              your work after a  power failure or system  crash, but it
  4716.              might be  worth it;  you decide.  To  do this,  add ":set
  4717.              dir=R:\" (or  whatever your  RAM disk's  name is)  to the
  4718.              elvis.rc file.
  4719.  
  4720.              Next, consider turning  off the "sync"  option.  When the
  4721.              sync option is turned on, Elvis  will close the temporary
  4722.              file and reopen it after every  change, in order to force
  4723.              DOS to  update the  file's directory  entry.  If  you put
  4724.              ":set nosync"  into the  elvis.rc file,  then  Elvis will
  4725.              only close the  file when  you start editing  a different
  4726.              text file, or  when you're exiting  Elvis.  Consequently,
  4727.              there is no  chance that you'll  be able to  recover your
  4728.              changes after a  power failure...  so if you're  going to
  4729.              this, then you might as well  store the temp files on the
  4730.              RAM disk, too.
  4731.  
  4732.  
  4733.      2)  Where's the <Esc> key on a DEC keyboard?
  4734.  
  4735.              I don't know.  Maybe the <F11> key?  You could always use
  4736.              ":map!" to make  some other key  act like the  <Esc> key.
  4737.              If all else fails, use <Control><[>.
  4738.  
  4739.  
  4740.      3)  Is there a way to show which keys do what?
  4741.  
  4742.              Yes.  The command ":map" will show  what each key does in
  4743.              command mode,  and  ":map!"  (with  an exclamation  mark)
  4744.              shows what each key does in input mode.
  4745.  
  4746.  
  4747.  
  4748.  
  4749.  
  4750.                                    - 1 -
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.              The table is divided into three columns: the key's label,
  4760.              the characters  that it  sends, and  the  characters that
  4761.              Elvis pretends you typed.
  4762.  
  4763.  
  4764.      4)  How can I make Elvis display long lines like the real vi?
  4765.  
  4766.              You can't yet.  The next version  of Elvis should support
  4767.              this, though.
  4768.  
  4769.  
  4770.      5)  I  can't  recover  my  text  [under  MS-DOS  or  Atari  TOS].
  4771.          According to  the directory listing, the  temporary file is 0
  4772.          bytes long.  What went wrong?
  4773.  
  4774.              MS-DOS and TOS only update a  file's directory entry when
  4775.              the file is closed.  If the system crashes while the file
  4776.              is still  open, then  the file's  length  is stored  as 0
  4777.              bytes.  The  ":set sync"  option is  supposed  to prevent
  4778.              this; you  probably  turned  it off  in  the interest  of
  4779.              speed, right?
  4780.  
  4781.              Under MS-DOS [I don't know about  TOS], you should delete
  4782.              the empty  temporary file, and  then run  CHKDSK/F.  This
  4783.              might find the data that belonged  in the empty file, and
  4784.              place it in a  new file with a  name like "000001.CHK" --
  4785.              something like  that.  You  can then  try to  extract the
  4786.              text from  that  temporary  file  by  giving the  command
  4787.              "elvprsv -R  000001.chk".   If  you're  lucky, then  this
  4788.              might recover your text.
  4789.  
  4790.  
  4791.      6)  What is the most current version of Elvis?
  4792.  
  4793.              Each version of Elvis that is  released to the public has
  4794.              a version number of the form "number point number".  As I
  4795.              write this, the most current version of Elvis is 1.7.
  4796.  
  4797.              The intermediate steps  between one release  and the next
  4798.              are labeled with  the next version number,  with a letter
  4799.              appended.  For example, after 1.4 was released, I started
  4800.              working on 1.5a.   I am currently working  on 2.0a.  When
  4801.              Elvis reaches  a  stable  state,  I'll  call it  2.0  and
  4802.              release it.
  4803.  
  4804.              Sometimes a beta-test version of  Elvis will be available
  4805.              via anonymous FTP from  m2xenix.psg.com, in the directory
  4806.              "pub/elvis/beta".
  4807.  
  4808.  
  4809.      7)  I  only got  executables,  but now  I want  the source  code.
  4810.          Where can I get it?
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.                                    - 2 -
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.              If you have  access to the  Internet, then you  should be
  4826.              able to fetch it from one  of the public archives such as
  4827.              plains.nodak.edu.  It is accessible via anonymous FTP, or
  4828.              via     an      email     server      named     "archive-
  4829.              server@plains.nodak.edu".   Elvis   is  located   in  the
  4830.              directory "/pub/Minix/all.contrib".
  4831.  
  4832.              It is also available  from the C Users'  Group, in volume
  4833.              #365.  As I write this, they  are asking $4 per disk plus
  4834.              $3.50 per  order  in  the US,  and  elvis requires  three
  4835.              disks; this is subject to change.   Their phone number is
  4836.              (913) 841-1631, and their address is:
  4837.  
  4838.                               The C Users' Group
  4839.                               1601 W. 23rd Street, #200
  4840.                               Lawrence  KS  66046-2743
  4841.  
  4842.  
  4843.      8)  Is this shareware, or public domain, or what?
  4844.  
  4845.              It is not public  domain; it is copyrighted  by me, Steve
  4846.              Kirkendall.  However, this  particular version  is freely
  4847.              redistributable, in  either  source  form  or  executable
  4848.              form.  (I  would  prefer that  you give  copies away  for
  4849.              free, complete with  the full source code...  but I'm not
  4850.              going to force you.)
  4851.  
  4852.              It is  not  shareware;  you aren't  expected  to send  me
  4853.              anything.  You can use it without guilt.
  4854.  
  4855.              It is not "copylefted." I hold a copyright, but currently
  4856.              I have not added  any of the usual  restrictions that you
  4857.              would find on copylefted software.  If people start doing
  4858.              really obnoxious  things  to  Elvis,  then  I will  start
  4859.              adding restrictions to  subsequent versions,  but earlier
  4860.              versions won't be affected.  (So  far, everybody has been
  4861.              pretty good  about  this  so  no  restrictions have  been
  4862.              necessary.)
  4863.  
  4864.  
  4865.      9)  Can I reuse parts of your source code?
  4866.  
  4867.              Yes.  Please be  careful, though,  to make sure  that the
  4868.              code really is mine.  Some of the code was contributed by
  4869.              other people, and I don't have  the authority to give you
  4870.              permission to  use it.   The author's  name can  be found
  4871.              near the  top of  each source  file.   If it  says "Steve
  4872.              Kirkendall" then you may use  it; otherwise, you'd better
  4873.              contact the author first.
  4874.  
  4875.              Please don't remove my name from the source code.  If you
  4876.              modify the source, please  make a note of  that fact in a
  4877.              comment near the  top of the source  code.  And, finally,
  4878.              please mention my name in your documentation.
  4879.  
  4880.  
  4881.  
  4882.                                    - 3 -
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.      10) Can Elvis work with non-ASCII files?
  4893.  
  4894.              Elvis is 8-bit  clean.  This means that  Elvis will allow
  4895.              you to  edit  files that  use a  European extended  ASCII
  4896.              character set.   However,  some terminals  are not  8-bit
  4897.              clean; they  treat characters in  the range  0x80-0x9f as
  4898.              control characters.  Elvis  expects all  characters above
  4899.              0x7f to be  treated as normal  displayable characters, so
  4900.              on these terminals Elvis may produce a scrambled display.
  4901.  
  4902.              Elvis can't edit binary files because it can't handle the
  4903.              NUL character, and because of line-length limitations.
  4904.  
  4905.              Elvis has  also modified  to work  with  16-bit character
  4906.              sets, but that  modification is not part  of the standard
  4907.              Elvis distribution.  Yongguang  Zhang (ygz@cs.purdue.edu)
  4908.              has created a  Chinese version of Elvis  that uses 16-bit
  4909.              characters and runs  under cxterm (Chinese  X-term) on X-
  4910.              windows systems.  Junichiro  Itoh (itojun@foretune.co.jp)
  4911.              has modified Elvis to edit Japanese text under MS-DOS.
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.                                    - 4 -
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.           CTAGS                                                       CTAGS
  4955.  
  4956.  
  4957.  
  4958.  
  4959.           NAME
  4960.                ctags - Generates "tags" and (optionally) "refs" files
  4961.  
  4962.           SYNOPSIS
  4963.                ctags [-stvra] filesnames...
  4964.  
  4965.           DESCRIPTION
  4966.                ctags generates the "tags"  and "refs" files from a group of
  4967.                C source  files.  The "tags"  file is used  by Elvis' ":tag"
  4968.                command, control-] command,  and -t option.  The "refs" file
  4969.                is sometimes used by the ref(1) program.
  4970.  
  4971.                Each  C source  file is scanned  for #define  statements and
  4972.                global  function  definitions.  The  name  of  the macro  or
  4973.                function becomes the name of a tag.  For each tag, a line is
  4974.                added to the "tags" file which contains:
  4975.                            - the name of the tag
  4976.                            - a tab character
  4977.                            - the name of the file containing the tag
  4978.                            - a tab character
  4979.                            - a way to find the particular line within the file.
  4980.  
  4981.                The  filenames list  will typically  be the  names of  all C
  4982.                source files in the current directory, like this:
  4983.                     $ ctags -stv *.[ch]
  4984.  
  4985.           OPTIONS
  4986.                -t   Include  typedefs.  A  tag will  be generated  for each
  4987.                     user-defined  type.  Also  tags will  be  generated for
  4988.                     struct  and enum  names.   Types are  considered to  be
  4989.                     global if they are defined in a header file, and static
  4990.                     if they are defined in a C source file.
  4991.  
  4992.                -v   Include variable declarations.  A tag will be generated
  4993.                     for each  variable, except for those  that are declared
  4994.                     inside the body of a function.
  4995.  
  4996.                -s   Include  static tags.  Ctags  will normally  put global
  4997.                     tags in the "tags" file, and silently ignore the static
  4998.                     tags.  This flag  causes both global and static tags to
  4999.                     be added.   The name  of a  static tag is  generated by
  5000.                     prefixing the  name of the declared  item with the name
  5001.                     of  the  file where  it  is defined,  with  a colon  in
  5002.                     between.   For  example,  "static foo(){}"  in  "bar.c"
  5003.                     results in a tag named "bar.c:foo".
  5004.  
  5005.                -r   This causes  ctags to generate both  "tags" and "refs".
  5006.                     Without -r, it would only generate "tags".
  5007.  
  5008.                -a   Append  to "tags", and  maybe "refs".   Normally, ctags
  5009.                     overwrites these  files each time it  is invoked.  This
  5010.                     flag  is useful  when  you have  to many  files in  the
  5011.                     current  directory for  you to  list  them on  a single
  5012.  
  5013.  
  5014.           Command Reference               1                          Page 1
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.           CTAGS                                                       CTAGS
  5021.  
  5022.  
  5023.  
  5024.                     command-line;  it  allows you  to  split the  arguments
  5025.                     among several invocations.
  5026.  
  5027.           FILES
  5028.                tags A cross-reference that lists each tag name, the name of
  5029.                     the source file that contains it, and a way to locate a
  5030.                     particular line in the source file.
  5031.  
  5032.                refs The "refs"  file contains the definitions  for each tag
  5033.                     in the  "tags" file, and  very little else.   This file
  5034.                     can be useful, for example, when licensing restrictions
  5035.                     prevent you from making the source code to the standard
  5036.                     C  library   readable  by  everybody,   but  you  still
  5037.                     everybody to know  what arguments the library functions
  5038.                     need.
  5039.  
  5040.           BUGS
  5041.                ctags   is   sensitive  to   indenting   and  line   breaks.
  5042.                Consequently, it  might not  discover all  of the tags  in a
  5043.                file that is formatted in an unusual way.
  5044.  
  5045.           SEE ALSO
  5046.                elvis(1), refs(1)
  5047.  
  5048.           AUTHOR
  5049.                Steve Kirkendall
  5050.                kirkenda@cs.pdx.edu
  5051.  
  5052.  
  5053.  
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063.  
  5064.  
  5065.  
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.           Command Reference               1                          Page 2
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.           ELVIS                                                       ELVIS
  5087.  
  5088.  
  5089.  
  5090.  
  5091.           NAME
  5092.                elvis, ex, vi, view, input - The editor
  5093.  
  5094.           SYNOPSIS
  5095.                elvis [flags] [+cmd] [files...]
  5096.  
  5097.           DESCRIPTION
  5098.                Elvis is a text editor which emulates vi/ex.
  5099.  
  5100.                On systems which pass  the program name as an argument, such
  5101.                as  Unix and  Minix, you  may also  install elvis  under the
  5102.                names "ex",  "vi", "view",  and "input".  These  extra names
  5103.                would  normally  be  links  to  elvis;  see the  "ln"  shell
  5104.                command.
  5105.  
  5106.                When elvis is invoked  as "vi", it behaves exactly as though
  5107.                it was invoked as  "elvis".  However, if you invoke elvis as
  5108.                "view", then  the readonly option  is set as  though you had
  5109.                given it  the "-R" flag.  If you invoke  elvis as "ex", then
  5110.                elvis will start up in the colon command mode instead of the
  5111.                visual command  mode, as  though you  had given it  the "-e"
  5112.                flag.  If you invoke  elvis as "input" or "edit", then elvis
  5113.                will start  up in  input mode, as  though the "-i"  flag was
  5114.                given.
  5115.  
  5116.           OPTIONS
  5117.                -r   To the  real vi, this  flag means that  a previous edit
  5118.                     should  be recovered.   Elvis, though,  has  a separate
  5119.                     program, called elvrec(1),  for recovering files.  When
  5120.                     you invoke  elvis with -r,  elvis will tell  you to run
  5121.                     elvrec.
  5122.  
  5123.                -R   This   sets  the  "readonly"   option,  so   you  won't
  5124.                     accidentally overwrite a file.
  5125.  
  5126.                -t tag
  5127.                     This causes elvis to start editing at the given tag.
  5128.  
  5129.                -m [file]
  5130.                     Elvis will search through file for something that looks
  5131.                     like an  error message from  a compiler.  It  will then
  5132.                     begin editing  the source  file that caused  the error,
  5133.                     with the cursor sitting on the line where the error was
  5134.                     detected.  If  you don't  explicitly name a  file, then
  5135.                     "errlist" is assumed.
  5136.  
  5137.                -e   Elvis will start up in colon command mode.
  5138.  
  5139.                -v   Elvis will start up in visual command mode.
  5140.  
  5141.                -i   Elvis will start up in input mode.
  5142.  
  5143.  
  5144.  
  5145.  
  5146.           Command Reference               1                          Page 1
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.           ELVIS                                                       ELVIS
  5153.  
  5154.  
  5155.  
  5156.                -w winsize
  5157.                     Sets the "window" option's value to winsize.
  5158.  
  5159.                +command or -c command
  5160.                     If you use the +command parameter, then after the first
  5161.                     file is loaded command is executed as an EX command.  A
  5162.                     typical example would  be "elvis +237 foo", which would
  5163.                     cause elvis to start editing foo and then move directly
  5164.                     to line  237.  The "-c  command" variant was  added for
  5165.                     UNIX SysV compatibility.
  5166.  
  5167.           FILES
  5168.                /tmp/elv*
  5169.                     During editing, elvis  stores text in a temporary file.
  5170.                     For UNIX, this file  will usually be stored in the /tmp
  5171.                     directory,  and  the  first  three characters  will  be
  5172.                     "elv".  For  other systems, the temporary  files may be
  5173.                     stored someplace else; see the version-specific section
  5174.                     of the documentation.
  5175.  
  5176.                tags This is the database  used by the :tags command and the
  5177.                     -t  option.   It is  usually  created  by the  ctags(1)
  5178.                     program.
  5179.  
  5180.                .exrc or elvis.rc
  5181.                     On  UNIX-like systems,  a file  called ".exrc"  in your
  5182.                     home directory is  executed as a series of ex commands.
  5183.                     A file by the same  name may be executed in the current
  5184.                     directory,  too.   On   non-UNIX  systems,  ".exrc"  is
  5185.                     usually an invalid file name; there, the initialization
  5186.                     file is called "elvis.rc" instead.
  5187.  
  5188.           ENVIRONMENT
  5189.                TERM This  is  the  name of  your  terminal's  entry in  the
  5190.                     termcap or terminfo database.  The list of legal values
  5191.                     varies from one system to another.
  5192.  
  5193.                TERMCAP
  5194.                     Optional.  If your system uses termcap, and the TERMCAP
  5195.                     variable is unset, then
  5196.                      will    read   your    terminal's   definition    from
  5197.                     /etc/termcap.  If  TERMCAP is set to  the full pathname
  5198.                     of a file (starting with  a '/') then  will look in the
  5199.                     named file instead  of /etc/termcap.  If TERMCAP is set
  5200.                     to a  value which  doesn't start  with a '/',  then its
  5201.                     value is assumed to  be the full termcap entry for your
  5202.                     terminal.
  5203.  
  5204.                TERMINFO
  5205.                     Optional.   If  your  system  uses  terminfo,  and  the
  5206.                     TERMINFO variable is unset, then
  5207.                      will read your terminal's definition from the database
  5208.                     in the /usr/lib/terminfo database.  If TERMINFO is set,
  5209.                     then  its value  is used  as the  database name  to use
  5210.  
  5211.  
  5212.           Command Reference               1                          Page 2
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.           ELVIS                                                       ELVIS
  5219.  
  5220.  
  5221.  
  5222.                     instead of /usr/lib/terminfo.
  5223.  
  5224.                LINES, COLUMNS
  5225.                     Optional.  These  variables, if set,  will override the
  5226.                     screen  size values given  in the  termcap/terminfo for
  5227.                     your terminal.   On windowing  systems such as  X,  has
  5228.                     other  ways  of determining  the  screen  size, so  you
  5229.                     should probably leave these variables unset.
  5230.  
  5231.                EXINIT
  5232.                     Optional.   This variable  can hold  EX  commands which
  5233.                     will be executed before any .exrc files.
  5234.  
  5235.                SHELL
  5236.                     Optional.   The SHELL variable  sets the  default value
  5237.                     for  the "shell" option,  which determines  which shell
  5238.                     program is  used to perform wildcard  expansion in file
  5239.                     names,  and also  which is used  to execute  filters or
  5240.                     external programs.   The default value  on UNIX systems
  5241.                     is "/bin/sh".
  5242.  
  5243.                          Note:  Under  MS-DOS,   this  variable  is  called
  5244.                     COMSPEC instead of SHELL.
  5245.  
  5246.                HOME This variable  should be set  to the name  of your home
  5247.                     directory.
  5248.                      looks for  its initialization  file there; if  HOME is
  5249.                     unset  then   the  initialization  file   will  not  be
  5250.                     executed.
  5251.  
  5252.                TAGPATH
  5253.                     Optional.  This variable  is used by the "ref" program,
  5254.                     which is  invoked by  the shift-K, control-],  and :tag
  5255.                     commands.  See "ref" for more information.
  5256.  
  5257.                TMP, TEMP
  5258.                     These optional  environment variables are  only used in
  5259.                     non-UNIX  versions of  .  They  allow  you to  supply a
  5260.                     directory name to be used for storing temporary files.
  5261.  
  5262.           SEE ALSO
  5263.                ctags(1), ref(1), virec(1)
  5264.  
  5265.                Elvis - A Clone of Vi/Ex, the complete elvis documentation.
  5266.  
  5267.           BUGS
  5268.                There  is  no  LISP  support.   Certain other  features  are
  5269.                missing, too.
  5270.  
  5271.                Auto-indent mode  is not quite compatible  with the real vi.
  5272.                Among  other things,  0^D and  ^^D don't  do what  you might
  5273.                expect.
  5274.  
  5275.  
  5276.  
  5277.  
  5278.           Command Reference               1                          Page 3
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.           ELVIS                                                       ELVIS
  5285.  
  5286.  
  5287.  
  5288.                Long  lines are  displayed differently.   The real  vi wraps
  5289.                long  lines onto  multiple  rows of  the  screen, but  elvis
  5290.                scrolls sideways.
  5291.  
  5292.           AUTHOR
  5293.                Steve Kirkendall
  5294.                kirkenda@cs.pdx.edu
  5295.  
  5296.                Many  other people  have  worked to  port  elvis to  various
  5297.                operating  systems.  To  see  who deserves  credit, run  the
  5298.                :version command  from within elvis, or  look in the system-
  5299.                specific section of the complete documentation.
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.  
  5311.  
  5312.  
  5313.  
  5314.  
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.           Command Reference               1                          Page 4
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.           ELVPRSV                                                   ELVPRSV
  5351.  
  5352.  
  5353.  
  5354.  
  5355.           NAME
  5356.                elvprsv - Preserve the  the modified version of a file after
  5357.                a crash.
  5358.  
  5359.           SYNOPSIS
  5360.                elvprsv ["-why elvis died"] /tmp/filename...
  5361.                elvprsv -R /tmp/filename...
  5362.  
  5363.           DESCRIPTION
  5364.                elvprsv preserves  your edited  text after elvis  dies.  The
  5365.                text can be recovered later, via the elvprsv program.
  5366.  
  5367.                For  UNIX-like systems,  you should never  need to  run this
  5368.                program from the command line.  It is run automatically when
  5369.                elvis is  about to die,  and it should be  run (via /etc/rc)
  5370.                when the computer is booted.  THAT'S ALL!
  5371.  
  5372.                For  non-UNIX systems  such as  MS-DOS,  you can  either use
  5373.                elvprsv the  same way as  under UNIX systems  (by running it
  5374.                from your  AUTOEXEC.BAT file), or you  can run it separately
  5375.                with the "-R" flag to recover the files in one step.
  5376.  
  5377.                If  you're editing  a file  when elvis dies  (due to  a bug,
  5378.                system  crash,  power   failure,  etc.)  then  elvprsv  will
  5379.                preserve  the  most   recent  version  of  your  text.   The
  5380.                preserved text is stored in a special directory; it does NOT
  5381.                overwrite your text file automatically.
  5382.  
  5383.                elvprsv will send mail  to any user whose work it preserves,
  5384.                if your operating system normally supports mail.
  5385.  
  5386.           FILES
  5387.                /tmp/elv*
  5388.                     The temporary file that elvis was using when it died.
  5389.  
  5390.                /usr/preserve/p*
  5391.                     The text that is preserved by elvprsv.
  5392.  
  5393.                /usr/preserve/Index
  5394.                     A  text file  which lists  the  names of  all preserved
  5395.                     files,  and  the names  of  the /usr/preserve/p*  files
  5396.                     which contain their preserved text.
  5397.  
  5398.           BUGS
  5399.                Due to  the permissions  on the /usr/preserve  directory, on
  5400.                UNIX  systems elvprsv  must be  run  as superuser.   This is
  5401.                accomplished by  making the  elvprsv executable be  owned by
  5402.                "root" and turning on its "set user id" bit.
  5403.  
  5404.                If you're  editing a nameless  buffer when elvis  dies, then
  5405.                elvprsv will pretend that the file was named "foo".
  5406.  
  5407.  
  5408.  
  5409.  
  5410.           Command Reference               1                          Page 1
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.           ELVPRSV                                                   ELVPRSV
  5417.  
  5418.  
  5419.  
  5420.           AUTHOR
  5421.                Steve Kirkendall
  5422.                kirkenda@cs.pdx.edu
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.  
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.  
  5438.  
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.  
  5445.  
  5446.  
  5447.  
  5448.  
  5449.  
  5450.  
  5451.  
  5452.  
  5453.  
  5454.  
  5455.  
  5456.  
  5457.  
  5458.  
  5459.  
  5460.  
  5461.  
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.  
  5475.  
  5476.           Command Reference               1                          Page 2
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.           ELVREC                                                     ELVREC
  5483.  
  5484.  
  5485.  
  5486.  
  5487.           NAME
  5488.                elvrec  - Recover  the modified  version of  a file  after a
  5489.                crash
  5490.  
  5491.           SYNOPSIS
  5492.                elvrec [preservedfile [newfile]]
  5493.  
  5494.           DESCRIPTION
  5495.                If  you're  editing  a  file  when  elvis dies,  the  system
  5496.                crashes,  or power  fails, the most  recent version  of your
  5497.                text will  be preserved.  The preserved text  is stored in a
  5498.                special  directory; it  does  NOT overwrite  your text  file
  5499.                automatically.
  5500.  
  5501.                The elvrec program  locates the preserved version of a given
  5502.                file, and writes it over the  top of your text file -- or to
  5503.                a new  file, if  you prefer.   The recovered file  will have
  5504.                nearly all of your changes.
  5505.  
  5506.                To see  a list of all recoverable files,  run elvrec with no
  5507.                arguments.
  5508.  
  5509.           FILES
  5510.                /usr/preserve/p*
  5511.                     The text that was preserved when elvis died.
  5512.  
  5513.                /usr/preserve/Index
  5514.                     A  text file  which lists  the  names of  all preserved
  5515.                     files,  and  the names  of  the /usr/preserve/p*  files
  5516.                     which contain their preserved text.
  5517.  
  5518.           BUGS
  5519.                elvrec is  very picky about filenames.  You  must tell it to
  5520.                recover the file using exactly the same pathname as when you
  5521.                were editing it.  The simplest way  to do this is to go into
  5522.                the same directory  that you were editing, and invoke elvrec
  5523.                with the same filename as elvis.  If that doesn't work, then
  5524.                try running  elvrec with no arguments,  to see exactly which
  5525.                pathname it is using for the desired file.
  5526.  
  5527.                Due to  the permissions  on the /usr/preserve  directory, on
  5528.                UNIX  systems elvrec  must  be run  as  superuser.  This  is
  5529.                accomplished  by making  the elvrec  executable be  owned by
  5530.                "root" and setting its "set user id" bit.
  5531.  
  5532.                If you're  editing a nameless  buffer when elvis  dies, then
  5533.                elvrec will pretend that the file was named "foo".
  5534.  
  5535.           AUTHOR
  5536.                Steve Kirkendall
  5537.                kirkenda@cs.pdx.edu
  5538.  
  5539.  
  5540.  
  5541.  
  5542.           Command Reference               1                          Page 1
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.           FMT                                                           FMT
  5549.  
  5550.  
  5551.  
  5552.  
  5553.           NAME
  5554.                fmt - adjust line-length for paragraphs of text
  5555.  
  5556.           SYNOPSIS
  5557.                fmt [-width] [files]...
  5558.  
  5559.           DESCRIPTION
  5560.                fmt  is a  simple  text formatter.   It  inserts or  deletes
  5561.                newlines, as necessary, to  make all lines in a paragraph be
  5562.                approximately the same  width.  It preserves indentation and
  5563.                word spacing.
  5564.  
  5565.                The default  line width is 72  characters.  You can override
  5566.                this with  the -width flag.  If you don't  name any files on
  5567.                the command line, then fmt will read from stdin.
  5568.  
  5569.                It  is typically  used  from within  vi to  adjust the  line
  5570.                breaks in  a single paragraph.  To do  this, move the cursor
  5571.                to the top of the paragraph, type "!}fmt", and hit <Return>.
  5572.  
  5573.           AUTHOR
  5574.                Steve Kirkendall
  5575.                kirkenda@cs.pdx.edu
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.           Command Reference               1                          Page 1
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.           REF                                                           REF
  5615.  
  5616.  
  5617.  
  5618.  
  5619.           NAME
  5620.                ref - Display a C function header
  5621.  
  5622.           SYNOPSIS
  5623.                ref [-t] [-c class]... [-f file]... tag
  5624.  
  5625.           DESCRIPTION
  5626.                ref quickly  locates and displays the  header of a function.
  5627.                To do this,  ref looks in the "tags" file  for the line that
  5628.                describes the function,  and then  scans the source file for
  5629.                the function.  When  it locates the function, it displays an
  5630.                introductory  comment  (if  there  is one),  the  function's
  5631.                declaration, and the declarations of all arguments.
  5632.  
  5633.           SEARCH METHOD
  5634.                ref uses  a fairly sophisticated tag  look-up algorithm.  If
  5635.                you supply  a filename via  -f file, then  elvis first scans
  5636.                the tags file for a  static tag from that file.  This search
  5637.                is limited to the tags file in the current directory.
  5638.  
  5639.                If you supply a  classname via -c class, then elvis searches
  5640.                for a  tag from that  class.  This search is  not limited to
  5641.                the current directory;  You can supply a list of directories
  5642.                in  the environment  variable TAGPATH,  and ref  will search
  5643.                through the  "tags" file in each directory  until it finds a
  5644.                tag in the desired class.
  5645.  
  5646.                If  that fails,  ref will  then try to  look up  an ordinary
  5647.                global  tag.   This search  checks  all  of the  directories
  5648.                listed in TAGPATH, too.
  5649.  
  5650.                If you've given the -t flag, then ref will simply output the
  5651.                tag line that it  found, and then exit.  Without -t, though,
  5652.                ref will search  for the tag line.  It will  try to open the
  5653.                source file,  which should be  in the same  directory as the
  5654.                tags file where the  tag was discovered.  If the source file
  5655.                doesn't exist, or is unreadable, then ref will try to open a
  5656.                file called "refs"  in that directory.  Either way, ref will
  5657.                try to locate the tag, and display whatever it finds.
  5658.  
  5659.           INTERACTION WITH ELVIS
  5660.                ref is  used by  elvis' shift-K  command.  If the  cursor is
  5661.                located on a word such as "splat", in the file "foo.c", then
  5662.                elvis will invoke ref with the command "ref -f foo.c splat".
  5663.  
  5664.                If elvis  has been  compiled with the  -DEXTERNAL_TAGS flag,
  5665.                then elvis  will use  ref to scan  the tags files.   This is
  5666.                slower than the  built-in tag searching, but it allows elvis
  5667.                to access the more sophisticated tag lookup provided by ref.
  5668.                Other  than  that, external  tags  should  act exactly  like
  5669.                internal tags.
  5670.  
  5671.  
  5672.  
  5673.  
  5674.           Command Reference               1                          Page 1
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.           REF                                                           REF
  5681.  
  5682.  
  5683.  
  5684.           OPTIONS
  5685.                -t   Output tag info, instead of the function header.
  5686.  
  5687.                -f file
  5688.                     The tag  might be a  static function in  file.  You can
  5689.                     use several  -f flags to have  ref consider static tags
  5690.                     from more than one file.
  5691.  
  5692.                -c class
  5693.                     The tag might be a  member of class class.  You can use
  5694.                     several -c  flags to have  ref consider tags  from more
  5695.                     than one class.
  5696.  
  5697.           FILES
  5698.                tags List of  function names and  their locations, generated
  5699.                     by ctags.
  5700.  
  5701.                refs Function   headers    extracted   from   source   files
  5702.                     (optional).
  5703.  
  5704.           ENVIRONMENT
  5705.                TAGPATH
  5706.                     List of  directories to  be searched.  The  elements in
  5707.                     the list  are separated  by either semicolons  (for MS-
  5708.                     DOS,  Atari TOS,  and  AmigaDos), or  by colons  (every
  5709.                     other  operating system).   For each  operating system,
  5710.                     ref has a built-in default which is probably adequate.
  5711.  
  5712.           NOTES
  5713.                You might want to  generate a "tags" file the directory that
  5714.                contains  the source  code for  standard  C library  on your
  5715.                system.  If  licensing restrictions prevent  you from making
  5716.                the library source  readable by everybody, then you can have
  5717.                ctags generate  a "refs" file,  and make "refs"  readable by
  5718.                everybody.
  5719.  
  5720.                If your  system doesn't come  with the library  source code,
  5721.                then  perhaps you  can produce  something workable  from the
  5722.                lint libraries.
  5723.  
  5724.           SEE ALSO
  5725.                elvis(1), ctags(1)
  5726.  
  5727.           AUTHOR
  5728.                Steve Kirkendall
  5729.                kirkenda@cs.pdx.edu
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.           Command Reference               1                          Page 2
  5741.  
  5742.  
  5743.